I have install apache2, mysql and all the neccesary thngs and then install phpmyadmin in my ubuntu 16.04.
It worked that day, but now, when I open localhost/phpmyadmin it downloads the index.php file.
it just not displaying the phpmyadmin page, but I am able to use the mysql database in my project.
just don't get it why this is happening.
Can anyone please help..!
Thank you in advance.
1 Answer
As your PHP is obviously working on another virtual host, you may have the virtual host that delivers PHPMyAdmin bound to a single IP address (or hostname). The name localhost usually resolves to 127.0.0.1 or 127.0.1.1 or their IPv6 equivalents, as listed in the file /etc/hosts. Make sure the virtual host configuration that is responsible for deliverying PHPMyAdmin also listens on localhost. The easiest way is to make it listen on every network interface.
To do so, change the headline of the virtual host configuration from
<VirtualHost myipaddr:80>where myipaddr is either the IP address or the hostname, to
<VirtualHost *:80>