php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58961 APC causes phpMyAdmin to fail
Submitted: 2009-11-24 06:02 UTC Modified: 2016-08-31 15:21 UTC
Votes:10
Avg. Score:4.4 ± 0.7
Reproduced:8 of 9 (88.9%)
Same Version:4 (50.0%)
Same OS:4 (50.0%)
From: gavin dot miller at areva-td dot com Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5.2.11 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gavin dot miller at areva-td dot com
New email:
PHP Version: OS:

 

 [2009-11-24 06:02 UTC] gavin dot miller at areva-td dot com
Description:
------------
Using Windows XP SP3 Fully patched
Apache 2.0.63 with OpenSSL
PHP 5.2.11
APC 3.0.19 (thread-safe) DLL from windows.php.com
PhpMyAdmin 3.2.2

Start apache with APC extension and phpmyadmin will fail

Fatal error: Class 'PMA_Error_Handler' not found in 
D:\website\draft\phpMyAdmin\libraries\common.inc.php on line 
58


Start apache without APC extension and phpmyadmin works

Reproduce code:
---------------
Start apache with APC extension and phpmyadmin will fail


Expected result:
----------------
phpmyadmin should continue to work with APC

Actual result:
--------------
Fatal error: Class 'PMA_Error_Handler' not found in 
D:\website\draft\phpMyAdmin\libraries\common.inc.php on line 
58

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-23 03:06 UTC] dormam at gmail dot com
I get the same problem but with PHP 5.3.0, with the exact same 
description. It's pretty weird for me, I haven't figured out 
why it doesn't work.
 [2010-04-23 03:36 UTC] rasmus@php.net
phpMyAdmin needs to call session_write_close() at the end of the session it uses to be compatible with PHP 5.3/APC
 [2010-05-02 18:08 UTC] ian dot matthews at imsoft dot co dot uk
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' ;
 [2010-10-27 11:01 UTC] damian dot pastorini at gmail dot com
This may help.

Posted by: doqunbop (from wampserver.com)
Date: February 24, 2010 11:04PM

The solution is simply to add this line to php.ini and restart the apache server: 
apc.cache_by_default = 0 

Regards!
 [2010-10-27 11:07 UTC] damian dot pastorini at gmail dot com
Other help I found:

Posted by Homerun31 (from programmersheaven.com)
on 30 May 2010 at 12:53 PM

<Directory "path/to/phpMyAdmin">
php_admin_flag apc.enabled Off
</Directory>
 [2016-08-31 15:21 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:21 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 02:01:23 2020 UTC