2

I have a forum that was originally running on Ubuntu 16.04.x LTS with PHP 7.0 and apache2. Recently I installed PHP 7.3 and updated the apache configuration. The system is also upgraded to Ubuntu 18.04.x LTS.

Here is the output of ls /etc/apache2/mods-enabled/php* after PHP 7.3 was installed:

/etc/apache2/mods-enabled/php7.3.conf  /etc/apache2/mods-enabled/php7.3.load

Though PHP 7.0 was disabled, the phpinfo() page still showed that the forum was running on PHP 7.0. So I decided to uninstall PHP 7.0 on my server using sudo apt-get purge php7.0-common.

However, the website won't load and show a 503 Service Unavailable error after PHP 7.0 was removed.

Here are the outputs of the error log in /var/log/apache2:

[proxy_fcgi:error] [pid 21873] [client 134.209.15.143:53270] AH01079: failed to make connection to backend: httpd-UDS

[proxy:error] [pid 21874] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php7.0-fpm.sock (*) failed

It seems like it is still trying to find something related to PHP 7.0.

I have also tried service php7.3-fpm start and systemctl enable php7.3-fpm but they won't help.

What should I do?

L13hyr
  • 21
  • 1
  • 2
  • Have you restarted apache? – wurtel Jul 16 '19 at 07:56
  • @wurtel yes I have. – L13hyr Jul 16 '19 at 07:59
  • 2
    Search for the text "/var/run/php/php7.0-fpm.sock" in /etc/apache2/, something like `grep -inr '/var/run/php/php7.0-fpm.sock' /etc/apache2`. This may give a clue on where the issue is. – Pothi Kalimuthu Jul 16 '19 at 08:02
  • 2
    @PothiKalimuthu Yes it did! The SetHandlers in the conf files in `/etc/apache2/sites-available/` were set to `proxy:unix:/var/run/php/php7.0-fpm.sock...`. After changing them to `...php7.3...`, problem solved! Thank you, I really appreciate your help! – L13hyr Jul 16 '19 at 08:10

0 Answers0