2

I have upgraded to Ubuntu 16.04 recently, and everythings works perfectly but I need php5, which is not in the official repositories. So I have tried with phpbrew: it didn't work (it was unable to switch to any php version).

Then I have found this question: How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?

The accepted answer looked perfect to me, so I have disabled phpbrew and installed all the packages. Everything seemed correct, but still php7 works correctly, and when I switch to php5 apache fails to load.

In /var/log/apache2/error.log I see this:

[Wed May 18 12:15:21.596482 2016] [mpm_prefork:notice] [pid 31446] AH00169: caught SIGTERM, shutting down

And if I do service apache2 status I see this:

mag 18 12:20:01 portatilone systemd[1]: Starting LSB: Apache2 web server...
mag 18 12:20:01 portatilone apache2[32670]:  * Starting Apache httpd web server apache2
mag 18 12:20:01 portatilone apache2[32670]: AH00558: apache2: Could not reliably determine the server's fully qualified 
mag 18 12:20:01 portatilone apache2[32670]: Segmentation fault
mag 18 12:20:01 portatilone apache2[32670]: Action 'start' failed.
mag 18 12:20:01 portatilone apache2[32670]: The Apache error log may have more information.
mag 18 12:20:01 portatilone apache2[32687]:  * Stopping Apache httpd web server apache2
mag 18 12:20:01 portatilone apache2[32687]:  *

How can I make apache work with php5?

ToX 82
  • 391

1 Answers1

1

Fixed by purging both apache and php. Only removing php was not sufficient. I'm not sure that this is the best way to do it, but it worked:

sudo service apache2 stop
sudo apt-get remove --purge apache2 apache2-utils apache2-bin php*
sudo apt-get autoremove

And this is what I used to reinstall everything: https://askubuntu.com/a/762161/411578

ToX 82
  • 391
  • Thanks for your reccomandation, I have added some details on how to remove apache and php, linking the solution that somebody else posted on how to reinstall everything correctly. – ToX 82 May 19 '16 at 14:49