I am installing phpmyadmin in Linux Mint 19 using this command sudo apt-get install mysql-server php7.0-mysql phpmyadmin. But I am getting below error while I am trying to browsing phpmyadmin.
-
2Could it be that whatever you use as webserver, hasn't been configured to run PHP?– Gerard H. PilleCommented Mar 22, 2020 at 9:12
-
@GerardH.Pille, yes.– abu abuCommented Mar 22, 2020 at 9:40
-
I don't know linux-mint. Doesn't it check dependencies when you installed phpmyadmin?– Gerard H. PilleCommented Mar 22, 2020 at 9:43
1 Answer
Your apache isn't interpreting PHP code.
This can be caused by inumerous reasons. In your case, Apache is configured with multi-processing module that don't interpret PHP alone, this is not wrong but they should be used with PHP-FPM, and it is not your case.
The simplest method to make it work, go to the terminal and disable both event and worker apache modules:
sudo su -
a2dismod mpm_event mpm_worker
You should know what is your php module version (mine is 7.2):
ls /etc/apache2/mods-available
Then enable prefork and php extensions and restart apache:
sudo su -
a2enmod mpm_prefork php7.2
systemctl restart apache2
Done!