ID:               43173
 Updated by:       [EMAIL PROTECTED]
 Reported By:      davidb at chelsea dot net
-Status:           Assigned
+Status:           Feedback
 Bug Type:         CGI related
 Operating System: Solaris 2.8
 PHP Version:      5.2.4
 Assigned To:      dmitry
 New Comment:

And you're sure php5 is the cgi binary and not the CLI binary?
As of some version we changed the binary name to be php-cgi. What was
the configure line you used?


Previous Comments:
------------------------------------------------------------------------

[2007-11-16 13:53:20] davidb at chelsea dot net

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  <Location /cgi-bin/php>
    SetHandler fastcgi-script
  </Location>
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php       .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.

------------------------------------------------------------------------

[2007-11-16 13:23:48] [EMAIL PROTECTED]

What do you mean in "Using the php proc manager to control children"?
Could you show your configuration files.

------------------------------------------------------------------------

[2007-11-15 23:28:25] davidb at chelsea dot net

I am absolutely, 100% certain that I'm using the right binary.  I've
gone back and forth multiple times, and it is reproducible.  Since this
is for http://www.fastcgi.com, I have added incentive to get it figured
out.

How can I help troubleshoot this?  How does php decide if it's running
as a CGI or a FastCGI?  How did that part of the code change?  I'm not a
C coder unfortunately (limited read-only knowledge) but from the truss()
I'm guessing that the check is failing and it's using the cgi interfaces
instead of the fastcgi interface when it wakes up.

The web server is running as follows:

-  apache 1.3.39
-  mod_fastcgi (previous versions, and also tried latest release of a
few days ago to see if it makes a difference)
-  Using the php proc manager to control children, NOT the apache
procmanager (this is the default mode of operation, or at least it was)
-  The only environment variable is PHP_FCGI_CHILDREN=2
-  suexec is spawning this

As I mentioned before, I have an identical configuration for 5.2.0 and
it works fine.

Thanks.

------------------------------------------------------------------------

[2007-11-15 22:53:06] [EMAIL PROTECTED]

Are you sure you're loading the right php binary in your apache conf?
I can't reproduce this, everything works just fine (although I'm using
lighttpd..:)

------------------------------------------------------------------------

[2007-11-15 14:02:38] davidb at chelsea dot net

Greetings.

I provided this input (or at least, I could swear I did).  Here it is
again.  I feel like a bit of a broken record, as this is clearly related
to the major FastCGI work that was done in 5.2.1'ish.

Here's the output:

  <tr><td class="e">Server API </td><td class="v">CGI/FastCGI
</td></tr>

The run_configure is IDENTICAL for 5.2.0 and 5.2.4.

Also, please note that php doesn't seem to be figuring out it's running
as a FastCGI application.

Please let me know if there's anything else I can do to help debug
this.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/43173

-- 
Edit this bug report at http://bugs.php.net/?id=43173&edit=1

Reply via email to