Trying to install phpmyadmin - getting error 500

6,809

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.

Share:
6,809
TheDude
Author by

TheDude

Updated on September 18, 2022

Comments

  • TheDude
    TheDude almost 2 years

    (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?

    • Nathan C
      Nathan C about 11 years
      Try the config with 664 to see if it works. Does your apache user own the config file? www-data or apache usually.
    • TheDude
      TheDude about 11 years
      @NathanC: You're a genius! chmodding config.inc.php with 664 did it man, please post this as an answer so that I can accept it!