Trying to install phpmyadmin - getting error 500
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.
TheDude
Updated on September 18, 2022Comments
-
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:
I uploaded the phpMyAdmin-*.tar.gz & unzipped it to
/var/www/html/phpmyadmin/
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 nouser_preferences
at all!I've been pulling my hear for two days now, anyone can tell me what's wrong anyway?
-
Nathan C about 11 yearsTry the config with 664 to see if it works. Does your apache user own the config file? www-data or apache usually.
-
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!