2

How do I open phpMyAdmin? If I open my localhost/phpmyadmin I have PHP script output but not the phpMyAdmin interface.

https://i.stack.imgur.com/zfoJi.png
(Click image to enlarge)

3 Answers 3

3

It looks like an incomplete configuration. Few things to check:

  1. Make sure that PHP is installed and running correctly. Try to run php -v from a command line and see if returns version information or any errors.
  2. Make sure that the PHP module is listed and uncommented inside of your Apache's httpd.conf This should be something like LoadModule php5_module "php5apache2_2.so" in the file. Search for LoadModule php, and make sure that there is no comment (;) at the beggining of the line.
  3. Make sure that Apache's httpd.conf file defines the PHP MIME type. This should be something like AddType application/x-httpd-php .php. Search for AddType, and then make sure there is an entry for PHP (again it must be uncommented).

Maybe that you could try to install PHP and PHP module for Apache again with the command line (I don't know what is your version of PHP, so may need to adapt):

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

I you have php7, just change php5 by php7.0, for example:

sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt

The command line to enable PHP module for Apache is:

sudo a2enmod php5

or

sudo a2enmod php7.0

You can follow this tutorial for the missing parts: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04

A tutorial of installation for PHP7 and Ubuntu 16: https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/

1

I am late here, Yet this will help someone someday. I faced this issue after upgrading my Ubuntu 16.04 to 18.04 This single command Fixed my issue.

sudo apt-get install libapache2-mod-php

libapache2-mod-ph is a meta-package that installs libapache2-mod-php7.

0
sudo apt install php libapache2-mod-php
sudo apt install php7.0-mbstring
sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
service apache2 restart

after that

gedit /etc/apache2/apache2.conf

add the following line

Include /etc/phpmyadmin/apache.conf

service apache2 restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .