HowTo Fix: PhpMyAdmin Displays Blank Page After Logging In


Recently I published an article about Windows Vista Home Premium and the “problems” I was running into when installing my programs. Well, this time I run into another problem when I installed appserv-win32-2.6.0 . Everything seemed to work just fine, Apache was working well, but when I tried opening PhpMyAdmin for some reason it was displaying a blank page after I entered my login information.

Method #1

The solution to this blank page problem is fairly easy. Simply modify this line in the phpmyadmin/

$cfg['Servers'][$i]['host']          = 'localhost';

to this:

$cfg['Servers'][$i]['host']          = '';

In the above code, you’re changing your name server to in order to use TCP/IP connection. After this, you should be able to see your PhpMyAdmin page by opening in your browser the address

Hope this helps!

Note: Whenever you specify “localhost” or “localhost:port” as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use “” instead of “localhost”. If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as Runtime Configuration in your PHP configuration and leave the server field blank.

UPDATE Dec 15, 2010:

Doing further research on this subject, this problem seems to be caused by a PHP bug #45150. The problem seems to be with Windows resolving localhost, more specifically localhost resolving to ::1 when IPv6 is enabled. If you have Windows Vista or Windows 7 it’s most likely you have IPV6 enabled by default.

Method #2

1. Go to Network Connections-> Properties and on local area connection->uncheck IPV6.

2.Open up \%windir%\system32\drivers\etc\ with a text editor and comment out this line:

::1 localhost

and prefix it:

#::1 localhost

This fix will help the loopback interface point to localhost.

Save it and your PHP/MySQL connections will immediately begin working.

This is another way of fixing this problem. Both methods will work, but I’d recommend to follow this last method over the first one since it’s updated and it solves the localhost issue in a more efficient way now that we have detected the source of the problem.

Big thanks: to my readers Joberror, Adrian, Brandon and everyone else for your contributions.

← Previous post

Next post →


  1. thank you , its working

  2. Mustafa

    Oh , that is fantastic … thanks for helping me and saving my time.

  3. Chuka

    Thank you. Thank you. Almost throw this machine out the window.

  4. thanks for your information, this is very helpfull.

  5. Jairo Zornosa

    Thank you so much I changed

    $cfg[‘Servers’][$i][‘host’] = ‘localhost’;


    $cfg[‘Servers’][$i][‘host’] = ‘’;

    and the problem was solved.

  6. mohammed salah

    not working
    thanks for your effort

  7. I use first trick
    $cfg[‘Servers’][$i][‘host’] = ’′;

    it works , but when I install wordpress, I got error.

    How to resolve this problem

  8. It helped thank you a lot

  9. Kamaljeet Singh

    Thanx now its working

  10. where is pmyadmin/ located so that i edit it

  11. Thanks broda.!! I have been trying to find the soltion from last 2 days…Your solution just did the magic.. Cheers!!

Comments are closed.