php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11243 exec() and passthru() don't work
Submitted: 2001-06-01 16:13 UTC Modified: 2001-06-09 16:24 UTC
From: mpalosuo at cs dot helsinki dot fi Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.0.5 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mpalosuo at cs dot helsinki dot fi
New email:
PHP Version: OS:

 

 [2001-06-01 16:13 UTC] mpalosuo at cs dot helsinki dot fi
I'm running currently latest snapshot version of PHP 4.0.6 from zend.com/snapshots (30-05-01) with Apache 1.3.19 under Win2k.

exec(), passthru() and shell() functions which simply didn't work on 4.0.5 cause now Apache to crash with following message: 

 "Apache.exe has generated errors and will be closed by Windows.
  You will need to restart the program.

  An error log is being created."

No error log is actually created.

Sometimes program executing function gets finished before Apache crashing, sometimes not.

It seems also that Apache crashed no matter what program or system command I try to execute.

Here's one example script that causes Apache to crash:

<?

  $output = system(`ping localhost -n 5`);
  echo $output;

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-02 19:59 UTC] sniper@php.net
I'm running the exact same version and I don't get any 
errors. But I have Apache 1.3.20.

Could you please try newer snapshot of PHP? And update your
apache too.

--Jani



 [2001-06-06 07:41 UTC] mpalosuo at cs dot helsinki dot fi
I updated Apache to 1.3.20 and the same error occured again. 

I also checked if the problem would still exist on another computer with almost equal software (Win2k, Apache 1.3.20, PHP 4.0.6 DEV). Then Apache didn't crash but instead executing the test script resulted into following:

  Warning: Unable to fork [ Pinging (normal ping message) ] in c:\htdocs\test.php on line 3

I can test what happens on third configuration too, if needed.
 [2001-06-09 00:05 UTC] sniper@php.net
Could you please try a newer snapshot from zend.com?
This should be fixed now.

--Jani


 [2001-06-09 16:09 UTC] sniper@php.net
From Daniel Beulshausen:
------------------------
system() and backticks won't work together...
use system or backticks, that's it.
change the backticks to quotes and it'll work perfectly.



 [2001-06-09 16:24 UTC] mpalosuo at cs dot helsinki dot fi
The latest snapshot (07-06-2001) doesn't crash Apache anymore and program execution works as it should. Great work, guys!

(Actually, that ping example wasn't actually the one I needed.. Sorry for inconvenience.)
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 10:01:23 2020 UTC