Recently I a upgraded my Debian server from Jessie to Stretch (Debian 9.5). All went well except that php generated websites are not executing when requested by the web-browser. As for instances http://92.51.132.110/~mlakova/hotglue/hotglue/index.php where i get as a response the php source code and not the generated html.
If I ssh onto the server and execute that same script with php index.php
i get the generated html, without errors.
The php --version
is PHP 7.0.30-0+deb9u1 (cli)
apache2 has module php7.0
enabled.
php5 is uninstalled and purged
The full phpinfo();
is available in http://92.51.132.110/info.php
The php error log is not showing any errors.
Anyone has leads on why this is happening and how can it be fixed? Might it have to do with the transition from mysql to mariadb?
2
Answers
Solved! It was due to /etc/apache2/mods-available/php7.0.conf having the followings lines, which only required commenting.
After it was only only a question disabling apache module php7.0; restarting apache and enabling the module and restarted did the job! thank you!
I had this problem too. You can fix this problem with these commands. You need to install
libapache2-mod
and enable apache PHP mode.Install:
Verify:
Load:
Restart apache:
And you can check.