|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26786 with CGI, shell_exec()/backtick operator never returns
Submitted: 2004-01-04 15:18 UTC Modified: 2004-01-15 01:09 UTC
From: php dot chad at cropcirclesystems dot net Assigned:
Status: No Feedback Package: CGI/CLI related
PHP Version: 4.3.4 OS: FreeBSD 5.1-p11
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.
Block user comment
Status: Assign to:
Bug Type:
From: php dot chad at cropcirclesystems dot net
New email:
PHP Version: OS:


 [2004-01-04 15:18 UTC] php dot chad at cropcirclesystems dot net
Using the Apache module or the CLI, everything works 
just fine.
However, when using PHP via CGI, the backticks operator 
and the shell_exec() function both never return, 
however, they DO successfully execute the command! php 
blocks idle, not racing.

Seems similar to #11224 in effect, but #11224 claims it 
was fixed in 4.0.6! Also, #11224 is on Windows using 
IIS! (yuck!)

I've built PHP 4.3.4 via FreeBSD's port system, so it 
could be their problem. I have yet to test this with 
another operating system. My php.ini is your php.ini-
recommended. My configure line is rather large, but can 
seen at '', 
although I have many optional modules, I've also tried 
this with FreeBSD's port's default module selections. I 
built using: cd /usr/ports/lang/php4; make 
WITHOUT_CLI=yes WITHOUT_APACHE=yes install; cp /usr/
local/etc/php.ini-recommended /usr/local/etc/php.ini

Reproduce code:
print shell_exec('/full/path/to/some/executable');

Expected result:
the stdout of the executable

Actual result:
indefinate waiting. The executable gets executed, 

I'd be happy to follow up with more testing/information. 
I'll let you know after I try the same thing on FreeBSD 
4.9 and Gentoo Linux.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-06 17:53 UTC]
Please try using this CVS snapshot:
For Windows:

Also, I could not access that phpinfo() page.
So put your full configure line here. (or rather, cut it down to bare minimum, configure the snapshot using that cut down version and test again)

 [2004-01-15 01:09 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 20:01:28 2024 UTC