By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

php and exec problem

P: n/a
Hello
I have no idea what is wrong :
my script goes :
....
$add="/usr/bin/htpasswd -b /var/www/users/users ".$HTTP_GET_VARS["login"]."
".$HTTP_GET_VARS["haslo"];
$str=exec($add);
....
Script is working witout any problem warnings error messages but line in
file users is not added
I dont no why? :(

if I do smoethink like this from command line (as user www)
$php -f g.php

skrypt g.php :

<?
$add="/usr/bin/htpasswd -b /var/www/users/users xxx xxx1";
$str=exec($add);
?>

line is added
I have no idea what is wrong - why from command line exec is working but
from http session is not.
please any ideas ?
(system OpenBSD3.3 php 4.2.3 )

regards
MK

Jul 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.