Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP FPM - check if running

Tags:

php

The documentation on php fpm website says that php fpm is part for coe php as of 5.3.3

I am running 5.3.10, how can i check that it is working correctly? I thought it was a service that ran on a port?

like image 458
Marty Wallace Avatar asked Feb 16 '13 21:02

Marty Wallace


People also ask

How do you check if PHP is working on Nginx?

To test your setup, type your server IP followed by /phpinfo. php in your web browser. If you see the following, you have successfully setup your NGINX PHP configuration.


2 Answers

Assuming you are on Linux, check if php-fpm is running by searching through the process list:

ps aux | grep php-fpm 

If running over IP (as opposed to over Unix socket) then you can also check for the port:

netstat -an | grep :9000 

Or using nmap:

nmap localhost -p 9000 

Lastly, I've read that you can request the status, but in my experience this has proven unreliable:

/etc/init.d/php5-fpm status 
like image 171
SamGoody Avatar answered Sep 22 '22 17:09

SamGoody


For php7.0-fpm I call:

service php7.0-fpm status 

php7.0-fpm start/running, process 25993

Now watch for the good part. The process name is actually php-fpm7.0

echo `/bin/pidof php-fpm7.0` 

26334 26297 26286 26285 26282

like image 36
prosti Avatar answered Sep 21 '22 17:09

prosti