phpMyAdmin returns 404 error, have to press refresh to get in!

I have been having problems with the phpMyAdmin installation on Gentoo Linux for some time now. The problem is when I tried to sign in the page would not refresh with the correct page, I had to press the refresh button on the browser to show the index.php page. On Firefox it would simply just stay on the login page where IE7 would give me a 404 error while still showing the correct URL in the address bar..

I tried to update the installed version initially which failed due to the php installation not being created with the correct ‘use’ flags. After updating php and emerge –unmerge phpmyadmin, I still had the same problems. So I ran another emerge –unmerge phpmyadmin and went in to delete all remaining objects in the phpmyadmin directory and then ran emerge –newuse phpmyadmin again. This time I took the default file and copied to before restarting Apache.

Still the problem existed, I could not understand why it was saying the url as shown in the browser address bar would return a 404 error yet is was definitely in the directory and had the correct attributes. After some digging I found a post to a forum which mentioned a re-direct issue with phpMyAdmin in certain installs which looked like it had similar results.

So I took the advice of the poster and put $cfg['PmaAbsoluteUri'] = "http://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']); into my file and it works!

I don’t know why the Gentoo installer didn’t add this to the config file? Normally with Gentoo the install takes care of all the basic configuration parameters and this was installed by the installer OK, just didn’t set up the config file or point me to any documentation which would suggest I needed to..

Hope this helps others who have the same issue!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.