Re: PHP problems / wrong page interpreted

David Birnbaum <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Michael,

It looks superficially correct.  You're kicking off the process, and it 
seems like it's getting passed.  If you do a truss or strace on the 
fastcgi process (one of the worker kids) you should be able to grab the 
whole environment/text that's being sent.  Is Apache actually sending 
the php-fcgi script?  I wonder if there's some difference in 2.0 v. 1.3, 
which is what we're still using here for php/fastcgi.

David.

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

Michael Baierl wrote:
> Hello out there,
>
> finally I have to admit here in the public that I just don't get it. I
> wanna run PHP via fastcgi to have a faster way of separating the php
> processes for each user - suphp is just too slow.
>
> Here is my setup:
> Apache-Conf:
>    <IfModule mod_fastcgi.c>
>      AddHandler fastcgi-script .fcgi
>      FastCgiIpcDir /var/lib/apache2/fastcgi
>
>      FastCgiServer /var/www/default/cgi-bin/php-fcgi
>      AddHandler php-fastcgi .php
>      <Location /cgi-bin/php-fcgi>
>        SetHandler fastcgi-script
>        Options +ExecCGI
>      </Location>
>      Action php-fastcgi /cgi-bin/php-fcgi
>      AddType application/x-httpd-php .php
>    </IfModule>
>
> Within the file cgi-bin/php-fcgi I have:
>     #!/bin/sh
>     PHPRC="/etc/php/cgi"
>     export PHPRC
>     PHP_FCGI_CHILDREN=4
>     export PHP_FCGI_CHILDREN
>     exec /usr/bin/php-cgi
>     #<?php phpinfo(); ?>
>
> The last "comment" is important, but I will come to that one. The
> Apache-Log now clearly states that FastCGI was started:
>
> [Sat Feb 25 09:32:28 2006] [warn] FastCGI: server
> "/var/www/default/cgi-bin/php-fcgi" started (pid 5357)
>
> and ps aux also shows those processes:
> www-data  5357  0.0  0.0 11480 3316 ? Ss   09:32   0:00 /usr/bin/php-cgi
> www-data  5361  0.0  0.0 11480 3320 ? S    09:32   0:00 /usr/bin/php-cgi
> www-data  5362  0.0  0.0 11480 3320 ? S    09:32   0:00 /usr/bin/php-cgi
> www-data  5363  0.0  0.0 11480 3320 ? S    09:32   0:00 /usr/bin/php-cgi
> www-data  5364  0.0  0.0 11480 3320 ? S    09:32   0:00 /usr/bin/php-cgi
>
> Now I go to http://defaul/index.php and I see the PHP-Info from the
> comment in the cgi-bin/php-fcgi shell-script. This means that instead of
> the index.php the php-fcgi script is interpreted by FastCGI (it is, I
> tried an infinite loop, and one of the FastCGI-Processes was executing
> this loop...).
>
> I tried around a lot but 'til now I was unable to find the problem...
> Maybe someone of you has an idea?
>
> More info about my system:
> Debian, uname -a:
> Linux 2.4.20-021stab028.19.777-enterprise #1 SMP Wed Oct 19 13:05:01 MSD
> 2005 i686 GNU/Linux
>
> Apache2 (mpm-prefork): 2.0.54-5
> PHP 4: /usr/bin/php4-cgi -v
> PHP 4.3.10-16.swsoft.1 (cgi-fcgi) (built: Aug 30 2005 20:19:30)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> libapache2-mod-fastcgi: 2.4.2-6
>
> Any ideas? The reward would be at least one virtual beer :)
>
> Thanks in advance,
>
> Mike
>

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.