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
, andREQUEST_METHOD
. You do not needDOCUMENT_ROOT
(even for a normal request).Under the correct pool (it is not a global setting) of your php-fpm config set (or uncomment):
Then run (replacing PORT):
Sample Output:
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 namedfcgi
and available from EPEL)As an aside, the same can be achieved with ping:
Set:
ping.path = /ping
(php-fpm config)Or for a regular PHP file (you have to use the full path, QUERY_STRING is optional):
On newer ubuntu (e.g. 20), install the libfcgi-bin package
apt install libfcgi-bin
to get the cgi-fcgi command.