There is a PHP5.3.3 bug that won't allow me to view php-fpm's /status page via Apache2. Is there a way to manually access this data? I cannot upgrade the box (Ubuntu 10.10, php5.3.4 not supported).

I've tried connecting using the technique here: http://inode.co.nz/testing-a-fastcgi-service, but no luck.


In order to load the /status page, you must have certain environment variables set, specifically: SCRIPT_NAME, SCRIPT_FILENAME, QUERY_STRING, and REQUEST_METHOD. You do not need DOCUMENT_ROOT (even for a normal request).

Under the correct pool (it is not a global setting) of your php-fpm config set (or uncomment):

pm.status_path = /status

Then run (replacing PORT):

SCRIPT_NAME=/status \
cgi-fcgi -bind -connect

Sample Output:

X-Powered-By: PHP/5.3.9
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Content-Type: text/plain

pool:                 web1
process manager:      dynamic
start time:           28/Jan/2012:20:49:44 -0500
start since:          5955
accepted conn:        41
listen queue:         0
max listen queue:     0
listen queue len:     128
idle processes:       1
active processes:     1
total processes:      2
max active processes: 1
max children reached: 0

Note: the results are pool specific.

Tested on a RHEL/CentOS 6 system with PHP v5.3.9.

(Side point of mention for people using CentOS - the package that provides cgi-fcgi is named fcgi and available from EPEL)

As an aside, the same can be achieved with ping:

Set: ping.path = /ping (php-fpm config)

cgi-fcgi -bind -connect

Or for a regular PHP file (you have to use the full path, QUERY_STRING is optional):

SCRIPT_NAME=/test.php \
SCRIPT_FILENAME=/var/www/path/to/test.php \
cgi-fcgi -bind -connect
  • IT WORKED!!! I had tried every iteration of (REQUEST_METHOD and DOCUMENT_ROOT and (SCRIPT_NAME or SCRIPT_FILENAME)). Thank you incredibly. – mikewaters Jan 29 '12 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.