RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Brian Duke
Thank you all for your collective help. I was very frustrated. This list helped me find the answer quickly and once again PHP is slowly all beginning to make sense. The default values enable safe-mode and that is what Jason was trying to get me to check. Thus when the php.ini wasn't where php thoug

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Brian Duke
> They're different, see manual for details. The Manual is brilliant. > exec("free -b", $data ,$result_code); > print_r($data); > > Array > ( > [0] => total used free sharedbuffers > cached > [1] => Mem: 256917504 2494013447516160

Re: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Jason Wong
On Friday 02 April 2004 23:16, Jay Blanchard wrote: > So there WAS more than one copy of the php.ini! :) No, the php binary (ie not the webserver php module) was *expecting* its php.ini to be located at /var/www/conf. As it wasn't there, the existing copy at /etc/php.ini was copied over. > Hav

Re: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Jason Wong
On Friday 02 April 2004 23:09, Brian Duke wrote: > If I wanted to use exec() for this project in the future, is: > > (shell_exec ("free -b")) = (exec("free -b", $data ,$result_code)) They're different, see manual for details. > I tried using exec as > exec("free -b", $data ,$result_code)); > but

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Jay Blanchard
[snip] I tried the php -I found php was looking for the php.ini in /var/www/conf. I copied php.ini from /etc/ to /var/www/conf. Now the shell_exec works fine. (shell_exec ("free -b")) = (exec("free -b", $data ,$result_code)) I tried using exec as exec("free -b", $data ,$result_code)); but I di

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Brian Duke
Forgive the top-post. I tried the php -I found php was looking for the php.ini in /var/www/conf. I copied php.ini from /etc/ to /var/www/conf. Now the shell_exec works fine. Thanks Jason. If I wanted to use exec() for this project in the future, is: (shell_exec ("free -b")) = (exec("free -b",

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-02 Thread Brian Duke
a, $result); -Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:51 AM To: 'Brian Duke'; 'Jay Blanchard'; 'William Lovaton'; [EMAIL PROTECTED] Subject: RE: [PHP] I think this is a bug...cant use exec commands. Th

Re: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Jason Wong
On Friday 02 April 2004 15:20, Brian Duke wrote: Please do not top post! > Ok here is my php.ini. directly from /etc/php.ini OK, is this where *you* think php.ini should be located? Or did you follow these instructions: > > executable? If the former use phpinfo() to find out where php thinks

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Daevid Vincent
#x27;; 'William Lovaton'; [EMAIL PROTECTED] > Subject: RE: [PHP] I think this is a bug...cant use exec commands. > > I tell you the truth. I have only 1 php.ini. There are other > ini files I > have looked at but I have not found anything in them about safe mode. >

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Brian Duke
Oops I catted the wrong file. But the file is exactly the same as mem.php. [EMAIL PROTECTED] swap]# cat mem.php -Original Message- From: Brian Duke [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:21 AM To: 'Jason Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] I think

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Brian Duke
Ok here is my php.ini. directly from /etc/php.ini ; Safe Mode ; safe_mode = Off ; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = Off ; When safe_mode is on, UID/GID checks are bypassed

Re: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Jason Wong
On Friday 02 April 2004 13:57, Brian Duke wrote: > I tell you the truth. I have only 1 php.ini. There are other ini files I > have looked at but I have not found anything in them about safe mode. What are these other ini files you've looked at? > Everything has been double or triple checked. Stil

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Brian Duke
I tell you the truth. I have only 1 php.ini. There are other ini files I have looked at but I have not found anything in them about safe mode. Everything has been double or triple checked. Still not able run any shell_exec commands from the command line. I need the output from free so if I use ex

RE: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread Jay Blanchard
[snip] May be you can look at exec() function: http://www.php.net/manual/en/function.exec.php [/snip] >From that page... Note: When safe mode is enabled, you can only execute executables within the safe_mode_exec_dir. For practical reasons it is currently not allowed to have .. components in the

Re: [PHP] I think this is a bug...cant use exec commands.

2004-04-01 Thread William Lovaton
May be you can look at exec() function: http://www.php.net/manual/en/function.exec.php I know this doesn't solve the problem but gives you an option to workaround the problem. The curious thing about the warning message is: where are the backquotes in your code?? -William El jue, 01-04-2004 a