Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Try the config with 664 to see if it works. Does your apache user own the config file? www-data or apache usually. –  Nathan C Jun 7 '13 at 11:26
    
@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! –  TheDude Jun 7 '13 at 12:01

1 Answer 1

up vote 2 down vote accepted

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|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.