Centos – Trying to install phptheadmin – getting error 500

centosphp5

(Using PHP 5.4.15, Apache 2.2, CentOS 6.4 minimal)

I'm having trouble installing phpMyadmin, I followed the instructions here, specifically:

  1. I uploaded the phpMyAdmin-*.tar.gz & unzipped it to /var/www/html/phpmyadmin/

  2. Copied config.inc.php & CHMODed it to 600 (I have suexec enabled, though I also tried with 660)

Yet I'm having error 500 whenever I access http://my-ip-address/phpmyadmin/index.php

I checked the apache2 logs, I see this error repeated countless times:

[Fri Jun 07 00:24:26 2013] [error] [client 11.222.33.44] PHP Fatal error: Call to a member function get() on a non-object in /var/www/_/8thpixel.com/public_html/phpmyadmin/libraries/Header.class.php on line 135

I checked the source of Header.class.php (didn't modify it), line #135 looks like this:

if ($GLOBALS['PMA_Config']->get('user_preferences') == 'session'
&& ! isset($_SESSION['userprefs_autoload'])

I checked $GLOBALS, there's no user_preferences at all!

I've been pulling my hear for two days now, anyone can tell me what's wrong anyway?

Best Answer

chmod 664 config.inc.php should resolve the problem. You may be able to get away with 660 if the config file is owned by the web server's user.

Related Topic