Check if PHP-FPM is working

16,751

Solution 1

Here's the solution - When I go to my Plesk's Web server settings, there is a checkbox that says "Process PHP by Nginx". Check that, and the phpinfo(); shows the Server API as FPM/FastCGI now! Cheers!

Solution 2

I assume you have installed and activated the PHP-FPM module like described in the Plesk Administration Guide under the section PHP-FPM.

http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=70669.htm][1]

Check the status of PHP-FPM:

sudo service php5-fpm status

Should output something like this:

php5-fpm start/running, process 1094
Share:
16,751
codemode
Author by

codemode

Lazy web developer, and a musician.

Updated on June 04, 2022

Comments

  • codemode
    codemode almost 2 years

    I have just installed Plesk 12, which comes inbuilt with an nginx server over an apache server. On enabling PHP-FPM, i cannot see it mentioned using the phpinfo(); function...thought the website works just fine.

    Also, on trying these -

    1.) telnet 127.0.0.1 9000

    Result =

    telnet: could not resolve 127.0.0.1/:9000: Servname not supported for ai_socktype
    

    2.) ps -ef | grep php-fpm

    Result =

    root      3188     1  0 03:23 ?        00:00:01 php-fpm: master process (/etc/php5/fpm/php-fpm.conf) www-data  3194  3188  0 03:23 ?   00:00:00 php-fpm: pool www                  www-data  3195  3188  0 03:23 ?        00:00:00 php-fpm: pool www                  root      6044  5140  0 12:23 pts/1    00:00:00 grep --color=auto php-fpm
    

    3.) netstat -tlpn | grep :9000

    Result = No result

    I'm not sure if something is wrong, or if PHP-FPM is working correctly. Any thoughts? Thanks.

  • codemode
    codemode over 8 years
    Hello! Thank you for your input. Yes, "service php5-fpm status" and "ps -ef | grep php-fpm" do give a positive response. But, not telnet ,netstat or phpinfo(); .. which is my confusion.
  • DjangoUnchained
    DjangoUnchained over 8 years
    Maybe you are using fastcgi_pass unix:/var/run/php5-fpm.sock; and not fastcgi_pass 127.0.0.1:9000;