phpMyAdmin + PHP 5.3.x Blank Page Login

phpMyAdmin with PHP 5.3.x blank page login issue was the problem that bothering me for few times. Starts from when i want to update my PHP version from 5.2.12 to 5.3.1 then i got that error. I think that’s the bugs from PHP 5.3.1 so i’m cancelling my upgrade to PHP 5.3.1

A few times passed, PHP releasing the new version, PHP 5.3.2 that i think php developers must have encounter that bugs because phpmyadmin is also main application that use php. But i got same problem there. After search on google and many experts blogs and references, i found some solutions to solve this problems.

The problem is caused by resolving “localhost” on Windows Vista and Windows 7 so i think there are no problems with other Operating Systems.

First we can change the $cfg[‘Servers’][$i][‘host’] to “127.0.0.1” because Windows Vista and 7 cannot resolve the localhost to 127.0.0.1 Just go to phpMyAdmin folder on your webserver and open config.inc.php

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

The second way is go to the C:WindowsSystem32driversetc then open the “hosts” file with notepad or other text editor (make sure you’re using administrator privileges) then remove the “#” in front of 127.0.0.1 but don’t remove for ::1 if you’re not using IPv6. With this way, you can keep your phpMyAdmin config host with “localhost”

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
	127.0.0.1       localhost
#	::1             localhost

2 Thoughts on “phpMyAdmin + PHP 5.3.x Blank Page Login

  1. Booya on August 3, 2010 at 3:32 am said:

    That localhost tip totally worked for me! Thanks for the tip

  2. Thanks very much
    I did the 2rd way and I solved the problem of blank page
    I dealt with the win7 resolution problem by deleting whole sentence  #127.0.0.1       localhost
    It can fix the bug, but your method did fix it
    Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation