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
> 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
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
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
[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
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",
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
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
#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.
>
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
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
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
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
[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
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
15 matches
Mail list logo