1

I am running a LAMP stack on CentOS 5.6 with PHP 5.3. I had installed phpMyAdmin and it worked. I was able to log in and do anything. Then I installed memcached and its PHP extension as well as APC and it’s PHP extension. I have restarted httpd and phpinfo() says that memcache and APC are installed and configured.

So why does phpMyAdmin now display a blank page after installing memcache and APC?

Giacomo1968
  • 3,522
  • 25
  • 38
Nbrochu
  • 39
  • 4

2 Answers2

1

In your php.ini file, tell APC to not cache the phpMyAdmin directory along the lines of adding:

apc.filters = "-/usr/share/phpmyadmin/.*"
Giacomo1968
  • 3,522
  • 25
  • 38
Eric Caron
  • 135
  • 3
0

According to this bug report on the official PHP site, the user ian dot matthews at imsoft dot co dot uk believes it to be an APC bug:

It's because APC doesn't handle the include/require path correctly. For example, an example of a typical include is:

require_once './libraries/common.inc.php';

APC doesn't work properly and, in my case, regards '.' as the apache directory instead of the current one. Whilst this seems to be an APC problem phpmyadmin could help by (1) not gratuitously using require_once when require would be better and (2) using the full path when possible, i.e. doing something like:

require dirname(__FILE__) . '/subdir/file_to_include.php' ;

But that basically means that you should tweak parts of phpMyAdmin to compensate for APC issues. Some more practical solutions suggested by damian dot pastorini at gmail dot com is to add the following line to php.ini:

apc.cache_by_default = 0 

Or disabling APC for phpMyAdmin via the Apache config like this:

<Directory "/usr/share/phpmyadmin">
    php_admin_flag apc.enabled Off
</Directory>

I am suggesting the path /usr/share/phpmyadmin since while you have not provided details on your system install of phpMyAdmin, this is the typical location it is installed in when doing an RPM install via yum or even a DEB install via apt-get/aptitude in Ubuntu.

Giacomo1968
  • 3,522
  • 25
  • 38