• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

php not working

UweP

Regular Pleskian
Ön my fresh debian system with plesk, php is not working. every time i reboot i have to do:
ps aux |grep php-fpm
and kill the fpm processes then do:
systemctl restart php5-fpm.service

Then, my default php5 installation of debian 8 only wants to download the php files.

Can someone help me?

Thanks!!!
 
root@baby # apt-get install php5-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-fpm is already the newest version.

but it just wants to downlaod the php files.
 
Could you please tell me what is php handler in use for an affected subscription? What is output of

# systemctl status php5-fpm

after reboot?
 
root@baby ~ # systemctl status php5-fpm
● php5-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php5-fpm.service; enabled)
Active: active (running) since Wed 2016-03-16 09:10:31 CET; 2min 6s ago
Process: 853 ExecStartPre=/usr/lib/php5/php5-fpm-checkconf (code=exited, status=0/SUCCESS)
Main PID: 1162 (php5-fpm)
Status: "Processes active: 0, idle: 2, Requests: 1, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/php5-fpm.service
├─1162 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
├─1164 php-fpm: pool www
└─1165 php-fpm: pool www

Mar 16 09:10:31 baby.unityhub.eu systemd[1]: Started The PHP FastCGI Process Manager.

but www.unitycraft.de says:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


Web Server at unitycraft.de

vhost unitycraft.de log says:
[Wed Mar 16 09:11:32.433258 2016] [proxy_fcgi:error] [pid 1366:tid 140547763201792] [client 8.29.198.25:54612] AH01079: failed to make connection to backend: httpd-UDS
[Wed Mar 16 09:12:12.782330 2016] [proxy:error] [pid 1366:tid 140547771594496] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/unitycraft.de/php-fpm.sock (*) failed
[Wed Mar 16 09:12:12.782345 2016] [proxy_fcgi:error] [pid 1366:tid 140547771594496] [client 192.0.101.226:54613] AH01079: failed to make connection to backend: httpd-UDS
[Wed Mar 16 09:12:50.174302 2016] [proxy:error] [pid 1366:tid 140547746416384] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/unitycraft.de/php-fpm.sock (*) failed
[Wed Mar 16 09:12:50.174317 2016] [proxy_fcgi:error] [pid 1366:tid 140547746416384] [client 79.210.49.65:54623] AH01079: failed to make connection to backend: httpd-UDS
 
also my debian 8 apache 2.4 php5-mpm doesnt work. i keep getting a download instead of the page showing.
 
root@baby ~ # systemctl status php5-fpm
● php5-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php5-fpm.service; enabled)
Active: active (running) since Wed 2016-03-16 09:10:31 CET; 2min 6s ago
Process: 853 ExecStartPre=/usr/lib/php5/php5-fpm-checkconf (code=exited, status=0/SUCCESS)
Main PID: 1162 (php5-fpm)
Status: "Processes active: 0, idle: 2, Requests: 1, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/php5-fpm.service
├─1162 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
├─1164 php-fpm: pool www
└─1165 php-fpm: pool www
Looks like started correctly after reboot.
And again:
Could you please tell me what is php handler in use for an affected subscription?
 
no. also not with fastcgi. Error: phpinimng failed: invoke-rc.d: initscript plesk-php56-fpm, action "status" failed. Job for plesk-php56-fpm.service failed. See 'systemctl status plesk-php56-fpm.service' and 'journalctl -xn' for details. invoke-rc.d: initscript plesk-php56-fpm, action "start" failed. Failed to start plesk-php56-fpm service
 
wrong error in the log. i get:
[16-Mar-2016 11:02:44] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 11:02:44] ERROR: FPM initialization failed
[16-Mar-2016 11:03:17] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 11:03:17] ERROR: FPM initialization failed
[16-Mar-2016 11:03:17] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 11:03:17] ERROR: FPM initialization failed
[16-Mar-2016 11:05:14] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 11:05:14] ERROR: FPM initialization failed
[16-Mar-2016 12:34:36] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:34:36] ERROR: FPM initialization failed
[16-Mar-2016 12:34:36] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:34:36] ERROR: FPM initialization failed
[16-Mar-2016 12:36:01] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:36:01] ERROR: FPM initialization failed
[16-Mar-2016 12:36:01] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:36:01] ERROR: FPM initialization failed
[16-Mar-2016 12:38:19] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:38:19] ERROR: FPM initialization failed
[16-Mar-2016 12:38:19] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/stuff.unitycraft.de/php-fpm.sock
[16-Mar-2016 12:38:19] ERROR: FPM initialization failed

instead
 
also, i enabled php7 now on one vhost. after a reboot its not available. if i do /etc/init.d/plesk-php70-fpm restart it works. please help.
 
ok i got it working. i shouldnt set any system debian specific php-fpm in the php-settings of the panel for that domain. i removed stuff.unitycraft.de default php handler and now everything works. thank you :)
 
Hi Uwe,

what did you exactly do here? I have the Same Problem on one specific Domain "An another FPM instance seems to already listen on .... php-fpm.sock"
Code:
● plesk-php56-fpm.service - The PHP 5.6.19 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/plesk-php56-fpm.service; enabled)
   Active: failed (Result: exit-code) since Sat 2016-04-02 20:25:27 CEST; 24s ago
  Process: 20364 ExecStart=/opt/plesk/php/5.6/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 20364 (code=exited, status=78)
 
i switched the apache module php5-event to php5-prefork. its not a much wanted solution but it fixed the problem.
 
@UweP and @Daka Media KG

The switch between Apache "event" and "prefork" mode is not really necessary: just stop the concerning php-fpm services and kill any other running php-fpm processes (if any exist), in order to restart php-fpm properly afterwards.

In essence, the "Apache switch" achieves the same, with the disadvantage that you are now in a new "Apache mode" that you potentially do not want.

However, note that the "event" mode for Apache is not particularly desirable in specific circumstances, it can cause many Apache related problems.

I would personally suggest that you maintain the prefork mode and have a look in the Apache documentation, to identify the differences between the event and prefork mode.

In essence, the prefork mode is favourable if the number of sites and site processes are that large, that the event mode will lead to resource overusage by Apache.

And, to be honest, that specific situation occurs quite fast with the Plesk + Apache stack.

Hope the above helps a bit.

Regards.....
 
Uhh okay,
thank you trialotto.

But can't figure out where the Process is comming from.
I already ran "killall .... fpm .."

Current State (Errors are):

IN PLESK when i try to turn on Service:
Fehler: Unable to make action: Unable to manage service by phpinimng: ('start', 'plesk-php54-fpm'). Error: Job for plesk-php54-fpm.service failed. See 'systemctl status plesk-php54-fpm.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript plesk-php54-fpm, action "start" failed.
Failed to start plesk-php54-fpm service

Code:
systemctl status plesk-php54-fpm.service -l
● plesk-php54-fpm.service - The PHP 5.4.45 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/plesk-php54-fpm.service; enabled)
   Active: failed (Result: exit-code) since Mon 2016-04-04 10:19:09 CEST; 46min ago
  Process: 30384 ExecStart=/opt/plesk/php/5.4/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 30384 (code=exited, status=78)

Apr 04 10:19:09 hostname.domain.tld php-fpm[30384]: [04-Apr-2016 10:19:09] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/<domainfromcustomer>/php-fpm.sock
Apr 04 10:19:09 hostname.domain.tld php-fpm[30384]: [04-Apr-2016 10:19:09] ERROR: FPM initialization failed
Apr 04 10:19:09 hostname.domain.tld systemd[1]: plesk-php54-fpm.service: main process exited, code=exited, status=78/n/a
Apr 04 10:19:09 hostname.domain.tld systemd[1]: Failed to start The PHP 5.4.45 FastCGI Process Manager.
Apr 04 10:19:09 hostname.domain.tld systemd[1]: Unit plesk-php54-fpm.service entered failed state.




Looking at MySQL Process
Code:
root@web-host04 ~ # ps -aux | grep mysql
root     19654  0.0  0.0  21800  3468 ?        S    Apr02   0:00 /bin/bash /usr/bin/mysqld_safe
root     19655  0.0  0.0  23684  1868 ?        S    Apr02   0:00 logger -p daemon.err -t /etc/init.d/mysql -i
mysql    19808  1.1  0.4 994256 294232 ?       Sl   Apr02  34:05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --open-files-limit=8000 --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root     19809  0.0  0.0  23684  2364 ?        S    Apr02   0:00 logger -t mysqld -p daemon.error
root     32648  0.0  0.0  12668  1716 pts/0    S+   11:03   0:00 grep mysql

What can i do here?
 
Back
Top