| Bug #11430 | PHP-CGI executing PHP-CGI thru Apache | ||||
|---|---|---|---|---|---|
| Submitted: | 12 Jun 2001 6:49am UTC | Modified: | 20 Aug 2002 8:39am UTC | ||
| From: | allanh at netcentralen dot dk | Assigned to: | |||
| Status: | Closed | Category: | Program Execution | ||
| Version: | 4.3.0-dev | OS: | Linux 2.4 (RH7.3 upd kernel) | ||
[12 Jun 2001 6:49am UTC] allanh at netcentralen dot dk
[12 Jun 2001 1:12pm UTC] sniper@php.net
I can reproduce this with 4.0.6RC3 too.
[3 Jul 2002 7:26am UTC] sander@php.net
Thank you for taking the time to report a problem with PHP. Unfortunately your are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP.
[3 Jul 2002 8:29am UTC] allanh at netcentralen dot dk
When I reported the bug I used the latest version. I just tested again and this now it no longer terminates by itself. It crashed the server. Error messages on the screen saying out of memory -- killed httpd. It is a different server.
[3 Jul 2002 7:10pm UTC] sniper@php.net
I tried it too..and almost had my server crashed. I guess the php binary used in httpd.conf is same as in the 'test' script?
[4 Jul 2002 1:15am UTC] allanh at netcentralen dot dk
yes
[20 Aug 2002 8:39am UTC] edink@php.net
The problem is that php-cgi reads the environmental variables set by apache, to find the correct script to execute, etc. This means that the php-cgi binary that is executed from the cgi script will also try to execute the original cgi scripts. The solution is to use php-cgi binary for executing cgi scripts through apache and php-cli binary for executing command line scripts (including those called withing the cgi script).
