0
  • Linux Mint 18
  • Apache2 server
  • MYSQL Server

Hello! Does anyone have a moment to advise me?

Here's my problem in brief: I am trying to configure phpMyAdmin on a Linux Mint 18 computer, but when I try to view http://localhost/phpmyadmin/, I get a "phpMyAdmin demo server" screen.

Details: The phpMyAdmin web page begins with an addJSON statement, and echoes this message:

'You are using the demo server. You can do anything here, but please do not change root, debian-sys-maint and pma users'

I understand I am viewing some sort of demonstration page for phpMyAdmin, but I would rather view the actual, familiar phpMyAdmin administration page.

Do I need to edit the Apache2.conf file? Or something else? Thank you very much for your time.

Eric

Eric B
  • 21
  • 1
  • 5
  • Is there a lot of HTML and PHP code, or does it just have the single addJSON statement followed by the demo server message? It sounds like your PHP interpreter isn't working correctly, but normally in that case you'd see several pages of raw code. – Isaac Bennetch Dec 18 '16 at 22:33
  • Hi, Isaac, thank you for your comment. I think PHP is installed properly. There is no HTML, but there is a lot of other code on that page which I believe is PHP. Maybe the PHP interpreter is not working, as you say. Though I am not sure what to do next, or even where to take my research next, and I have been really researching this one. =) Thank you for any advice you might have. – Eric B Dec 21 '16 at 03:52

4 Answers4

0

i had this problem with ubuntu 16.04

fix

1# Remove phpmyadmin completely

  sudo apt-get remove phpmyadmin

2# Install phpmyadmin with this command

  sudo apt-get install phpmyadmin apache2-utils

3# add phpmyadmin to the apache configuration

  sudo nano /etc/apache2/apache2.conf  

And put below line to end of the file

 Include /etc/phpmyadmin/apache.conf

4# restart apache2

 sudo systemctl restart apache2  

or

 sudo service apache2 restart
0

I had the same problem, but my error was because I commented the Handler in php.ini

<FilesMatch \.php$>
   SetHandler application/x-httpd-php
</FilesMatch>
Tamer Shlash
  • 9,314
  • 5
  • 44
  • 82
aledo
  • 11
  • 2
0

I just enable php on apache and start work normal

a2enmod php7.3

I had to disable mpm_event because it was causing some comflict

a2dismod mpm_event
-1

Perhaps PHP code is not being executed, instead code shows on the page or Apache shows php code instead of executing may help.

Linux Mint is similar to Ubuntu/Debian, so you need the libapache2-mod-php5 package installed (assuming you've used the package manager to install the rest of your PHP/Apache stack): sudo apt-get install php5 libapache2-mod-php5.

You can test this further by adding a file (called test.php or phpinfo.php or whatever else suits you) in the main phpMyAdmin folder with the content <?php phpinfo(); ?> -- then try to load that file directly and see if you get a long list of system status or simply the contents of the file displayed. The main reason to put it in the phpMyAdmin folder is that your Apache configuration might handle different folders differently, this is the simplest way to test what happens on that particular folder.

Community
  • 1
  • 1
Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
  • Hi, Isaac, I did some more investigating, working from your helpful suggestions. I think you are right; the PHP interpreter is not working. I found that I use PHP 7; Apache 2.4. Apache 2.4 works correctly. In a web browser, I go to localhost, and see the Apache welcome page. I created the phpinfo.php file as you specified; I put phpinfo.php in /var/www/. But when I view that file in a browser, I do not see the familiar, lavender PHP info page, but only a blank while browser screen. I am researching more about the PHP interpreter. I really appreciate your thoughtful advice. Eric – Eric B Dec 22 '16 at 15:06
  • Dear Isaac, I fixed it, using extreme measures and a little more research. Here is what I did: * Reinstall Linux Mint 18.1. * Install PHP 7 Then install mysql, apache2, phpmyadmin. Then edit apache2.conf. Then restart apache. Result: I can see the familiar PHPMyAdmin administrative screen. Thank you very much for your advice and time. Eric sudo apt install mysql-server sudo apt-get install apache2 sudo apt-get install phpmyadmin sudo nano /etc/apache2/apache2.conf add at end of apache2.conf: Include /etc/phpmyadmin/apache.conf sudo /etc/init.d/apache2 restart – Eric B Dec 24 '16 at 18:35