php fastcgi support - how do u do it?

Igor Clark igor at pokelondon.com
Wed Jul 16 12:36:00 MSD 2008


Hi,

On 16 Jul 2008, at 03:23, Jeffrey 'jf' Lim wrote:

> On Tue, Jul 15, 2008 at 6:11 PM, Igor Clark <igor at pokelondon.com>  
> wrote:
>
> When I did, I was delighted to see how much more neatly it does  
> everything I'd done in my scripts, as well as providing excellent  
> additions such as signal support for useful functions and a fix for  
> the "blank 200 page" problem.
>
> sorry - got more info on these (signal support for useful functions)?


 From http://php-fpm.anight.org/docs.html

"Master process understands signals:

SIGINT, SIGTERM - immediate termination

SIGQUIT - graceful stop

SIGUSR1 - re-open log file

SIGUSR2 - graceful reload of all workers + reload of fpm conf/binary"

> and what's that "blank 200 page problem" that you mention about?


Sometimes PHP running in the built-in FastCGI mode, rather than  
returning a 500 on error condition, just throws a 200 and a blank  
page. It can be frustrating and make things difficult to debug,  
because you can't initially see where the error's happening. php-fpm  
adds the php.ini option fastcgi.error_header which means you can force  
your own HTTP status code and message, as per the example on the php- 
fpm site:

fastcgi.error_header = "HTTP/1.0 550 Server Made Big Boo"

More details at http://php-fpm.anight.org/extra_features.html#error_header 
  - or Google English translation here: http://66.102.9.104/translate_c?hl=en&sl=ru&tl=en&u=http://php-fpm.anight.org/extra_features.html&usg=ALkJrhi7P2ZW5JySwTqZE2TLMLx2AJRE3w#error_header

Cheers
i

--
Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20 7749 5355  
• www.pokelondon.com








More information about the nginx mailing list