Well, I am having problem while installing phpmyadmin
to my linux system. I followed all the instruction from digital ocean. After, I verify it in the browser then it shows this kind of php code
.
Did I miss something during my installation? My version of php is 7 and I am using ubuntu 14.04.
Asked
Active
Viewed 4.0k times
18

Saugat Bhattarai
- 2,614
- 4
- 24
- 33
-
try http://askubuntu.com/questions/55280/phpmyadmin-is-not-working-after-i-installed-it – Karthi Oct 01 '16 at 11:34
-
1Maybe u r using Php tag without Php ` ?>` if yes change it to `` – devpro Oct 01 '16 at 11:38
-
1In case this helps someone else, I upgraded Ubuntu 14.04 to Ubuntu 16.04 and when trying to bring up phpmyadmin at `http://127.0.0.1/phpmyadmin`, php source code was being shown. Took a while to figure out the fix, which is below. 1. phpmyadmin.conf file location is at `/etc/apache2/conf-enabled/phpmyadmin.conf`. 2. Add Apache Include statement that indicates where phpmyadmin.conf file can be found. 2a. # File: /etc/apache2/apache2.conf 2b. Include /etc/apache2/conf-enabled/phpmyadmin.conf 3. `http://127.0.0.1/phpmyadmin` does display phpMyAdmin interface now. – Chris Jul 06 '17 at 12:51
-
@Chris yours is the correct answer – Vector May 28 '19 at 22:04
2 Answers
16
Its seems that your server(Apache) is not recognizing php script as PHP
language to be executed. At first check whether PHP
is enable or not by running the following command in your terminal:
a2query -m php7.0
If it says somathing like PHP
is not enable then run the following command:
sudo a2enmod php7.0
Then restart your Apache2
server with the following command:
sudo service apache2 restart
Try refreshing the phpmyadmin page now. Hope this will solve your problem. Best of luck

Imran
- 4,582
- 2
- 18
- 37
-
7This one works for me `sudo apt-get install libapache2-mod-php5` – Saugat Bhattarai Feb 28 '17 at 10:32
-
7or just use ***sudo apt-get install libapache2-mod-php*** if you are not sure of the version. This worked for php8.0 – Ifeanyi Amadi Jan 10 '22 at 12:52
-
1i can recommend this. because it worked me also `sudo apt-get install libapache2-mod-php` – Chaminda Chanaka Mar 04 '23 at 02:54
2
After you install php for (I'm assuming) Apache you need to restart the webserver for it to read the config files.

ivanivan
- 2,155
- 2
- 10
- 11
-
tbh, had to go through a lot of fixes and retries before, but this answer was the last thing that needed to be done. – Fayeaz Ahmed Sep 04 '20 at 12:11
-