Bug #7324 Updated: exec and system return -1

From: Date: Thu, 11 Apr 2002 23:39:44 +0000
Subject: Bug #7324 Updated: exec and system return -1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4704@lists.php.net to get a copy of this message
ID: 7324 Updated by: wez@php.net Reported By: shterng@akula.com Status: Closed Bug Type: *General Issues Operating System: Linux 2.2.17 PHP Version: 4.0.3pl1 New Comment: Check your safe_mode and safe_mode_exec_dir configuration settings. Previous Comments: ------------------------------------------------------------------------ [2002-04-11 18:35:51] remove.randelld@fiprojects.com.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 18:30:46] remove.randelld@fiprojects.com.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. ------------------------------------------------------------------------ [2000-11-29 06:16:52] stas@php.net no feedback ------------------------------------------------------------------------ [2000-10-23 05:07:00] stas@php.net Could not reproduce. Please provide short reproducing code for this problem. ------------------------------------------------------------------------ [2000-10-18 19:03:29] shterng@akula.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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=7324&edit=1

« previous php.bugs (#4704) next »