Running phpMyAdmin with APC cache enabled, fatal PHP errors

Mattias Geniar, Thursday, January 20, 2011 - last modified: Sunday, May 13, 2012

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/ on line 58
PHP Fatal error:  Call to undefined function PMA_getenv() in /path/to/phpMyAdmin/libraries/ 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

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!

Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek, public speaker and podcaster. If you're interested in keeping up with me, have a look at my podcast and weekly newsletter below. For more updates, follow me on Twitter as @mattiasgeniar.

I respect your privacy and you won't get spam. Ever.
Just a weekly newsletter about Linux and open source.

SysCast podcast

In the SysCast podcast I talk about Linux & open source projects, interview sysadmins or developers and discuss web-related technologies. A show by and for geeks!

cron.weekly newsletter

A weekly newsletter - delivered every Sunday - for Linux sysadmins and open source users. It helps keeps you informed about open source projects, Linux guides & tutorials and the latest news.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!


Apocalypskmaw Monday, February 28, 2011 at 16:53

Thanks for sharing Matti !
You made my day !


Eric Caron Tuesday, March 22, 2011 at 18:45

Another fix, as recommended by phpMyAdmin, is to use the “apc.filters” option in php.ini:

If you have weird random problems also check out whether apc or eaccelerator is the culprit. If the problem is with APC it’s possible to prevent scripts in the phpMyAdmin directory from being cached with apc.filters. For instance you can add something like this to your php.ini: apc.filters = “-/usr/share/phpmyadmin/.*”


Tuan Tuesday, April 12, 2011 at 05:53

Same with me this morning. It’s too slow when using phpmyadmin and it throw error. Yesterday i installed APC and i think apc is the cause of error. Thanks for your advice.


anonymous Wednesday, April 13, 2011 at 00:03

How can i do this on Windows IIS?


Dirk-Jan de Groot Wednesday, June 15, 2011 at 12:25

Someone might benefit from this;

if you use virtual hosts and have apc installed, your virtual hosts might not work anymore. I needed APC to run a joomla site wich i had under a virtual host. (on Macos Snow Leopard).

The solution for me was
1) installing APC (find some tutorial about that)
2) Modify php.ini and include ‘’
3) In the bottom include this:

apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 32M
apc.optimization = 0
apc.num_files_hint = 512

4) To prevent the problem with virtual hosts i changed apc.enabled = 0 (then restart apache). So actually use this:
apc.enabled = 0
apc.shm_segments = 1
apc.shm_size = 32M
apc.optimization = 0
apc.num_files_hint = 512

and restart apache.

Works for me.


Ben Friday, November 11, 2011 at 01:08

Matti, THANK YOU. This issue was driving me crazy and consumed eight hours of my life. You were fortunate to have errors in your PHP logs; I had none (despite error-reporting being set to -1 [E_ALL]). Disabling APC for the phpMyAdmin directory, per your suggested solution, resolved the issue for me.


موقع مسيحي دوت كوم Wednesday, April 3, 2013 at 06:36

Thank you for sharing this info. After googling for 5 hours you saved my day :)
Thank you VERY much


zaza Thursday, June 13, 2013 at 11:57

hello. how are you guys doing.
I really need help on this one. I believe I’ve the same problem. Whenever I wanna go to phpmyadmin on my localhost, i will get this error –
Fatal error: Call to undefined function PMA_cacheExists() in C:\wamp\apps\phpmyadmin3.5.1\libraries\database_interface.lib.php on line 1237

I’m able to access phpmyadmin panel when i first install wamp. Now, my wordpress site is complete and I wanna transfer them to my hosting, so I have to go to phpmyadmin to export my db right…but i cant.. :(
Can anyone please help me.
Thank you :(



Leave a Reply

Your email address will not be published. Required fields are marked *

Inbound links