php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7324 exec and system return -1
Submitted: 2000-10-18 19:03 UTC Modified: 2002-04-11 19:39 UTC
From: shterng at akula dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.3pl1 OS: Linux 2.2.17
Private report: No CVE-ID: None
 [2000-10-18 19:03 UTC] shterng at akula dot com
It seems like in 4.0.3pl1 both exec and system put -1 in the return arguement, indicating a problem in the exec() call.  It worked fine in 4.0.2.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-23 05:07 UTC] stas@php.net
Could not reproduce. Please provide short reproducing code for this problem.
 [2000-11-29 06:16 UTC] stas@php.net
no feedback
 [2002-04-11 18:30 UTC] remove dot randelld at fiprojects dot com dot com
I am using SuSE 7.1, Apache 1.3.14 and PHP 4.0.4pl1 - Using the examples you have online and in my PHP Core Programming book for the system() it fails - an example piece of code would be

<?
phpinfo();
system("ls -l");
?>

Replacing the 'ls -l' with a date command, with or without a pathname and quotes gets no response either.  The only error I get is reported in my Apache error_log which says 

sh: /ls: No such file or directory

Note, again, the message above occurs regardless if I prefix my command with its correct full pathname or not.

In order to assist anybody who might be able to help I have uploaded my configuration files to

http://www.fiprojects.com/php.ini.conf  and
http://www.fiprojects.com/httpd.conf

Note, my php.ini file is called php.ini on my system, I haev renamed it to make it easier on most folks browsers on purpose.

Many thanks - and keep up the good work...
randell d.
 [2002-04-11 18:35 UTC] remove dot randelld at fiprojects dot com dot com
Apologies - the sample piece of code I included eariler did not make it clear that the phpinfo(); responds fine confirming my php installation is working - however I do not get anything useful from using the system() function other than the message in my Apache log file that I mentioned earlier... and... I'm using SuSE 7.1 kernal 2.4.0-4Gb

Sorry... and thanks again...
laters
randell d.
 [2002-04-11 19:39 UTC] wez@php.net
Check your safe_mode and safe_mode_exec_dir configuration
settings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 15:01:56 2024 UTC