Re: problems with exec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What is the safe_mode value in your php.ini?

To run exec the value of your safe_mode has to be OFF.


admin@xxxxxxxxxx escribió:
Try

exec('/path/to/copy', $return);
print_r($return);

read the manual : http://nl3.php.net/manual/en/function.exec.php

Description
string exec ( string command [, array &output [, int &return_var]] )

gr,
Thijs

On Wed, 29 Nov 2006 23:22:13 -0700, "Ray" <ray@xxxxxxxxxx> wrote:
hello;
I am trying to write a script to do some auto configuration of my
webserver. Part of the process involves copying some configuration files
from other places on the server to a working directory where they can be
modified.
I am running freeBSD 6.0, Apache 2.2.3, php 5.1.5
I can't seem to get the exec() command to work.
I have an external shell script called 'copy' that takes care of getting
files. script is currently set to mode 777 when run from the shell it
works perfectly.

however, in the php script

echo exec('whoami');
exec('/path/to/copy');
the only return is
'www' (the username correctly returned from whoami) also files aren't
changed.
any suggestions, pointers, log files to check would be appreciated as I
have spent several hours on google, in manuals, etc. haven't tried the
ougi board, but that's about it  ;-)
tia
Ray

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux