Connecting Tech Pros Worldwide Help | Site Map

php and exec problem

  #1  
Old July 17th, 2005, 12:00 AM
Macius The Great
Guest
 
Posts: 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



Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
php exec problem with unzip olddocks answers 1 October 17th, 2008 04:49 PM
PHP exec CorfuVBProgrammer answers 4 May 7th, 2007 10:15 PM
shell symbols and exec problem new guy answers 2 March 27th, 2006 02:55 PM
php exec problem glin@tollnz.co.nz answers 3 July 21st, 2005 07:56 AM
problems with basic authentication .htpasswd called from php exec() starlightjen answers 3 July 17th, 2005 02:50 PM