Running phpMyAdmin with APC cache enabled, fatal PHP errors

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, January 20, 2011

Follow me on Twitter as @mattiasgeniar

If you run phpMyAdmin in combination with PHP’s APC caching module, you might find your phpMyAdmin returning blank white pages instead of the actual management interface. In your errors logs, you can see messages like this.

PHP Fatal error:  Class 'PMA_Error_Handler' not found in /path/to/phpMyAdmin/libraries/common.inc.php on line 58
PHP Fatal error:  Call to undefined function PMA_getenv() in /path/to/phpMyAdmin/libraries/common.inc.php on line 143

The solution is to exclude phpMyAdmin from the APC cache, which you can do with a following parameter in your Virtual Host configuration.

<Directory /path/my/phpMyAdmin/>
php_admin_value apc.enabled 0
</Directory>

Update the path above to the correct directory where phpMyAdmin resides, and restart your Apache to activate the config.

If the above does not fix it, you can also try to clear your PHP sessions, which are known to cause issues with phpMyAdmin. Especially if your php.ini is lacking explicit “session.save_path” declarations (by default they point to /tmp).

session.save_path = "/tmp"

Good luck!



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.