|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57121 APC + Gallery2 = Runtime Errors
Submitted: 2006-07-01 02:57 UTC Modified: 2006-07-08 03:48 UTC
From: stripslashes at stripslashes dot net Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.1.2 OS: Ubuntu Dapper 6.06 x86_64
Private report: No CVE-ID: None
 [2006-07-01 02:57 UTC] stripslashes at stripslashes dot net
Gallery 2 (latest version: 2.1.1 - and APC 3.0.10.

When one navigates down to showing the actual image (inside any number of albums and sub-albums), PHP issues a FATAL ERROR.

Gallery 2 Source:

All actions origionate from /path/to/htdocs/gallery/main.php

Reproduce code:
/* in the gallery source, file /path/to/htdocs/gallery/modules/core/classes/helpers/GalleryEntityHelper_simple.class */
foreach ($onLoad as $id) {
  $ret = $cached[$id]->onLoad();
  if ($ret) {
    return array($ret->wrap(__FILE__, __LINE__), null);
  GalleryDataCache::put("GalleryEntityHelper::loadEntitiesById($id)", $cached[$id]);

/* this file can be viewed here: */

Expected result:
Display the image.

Actual result:
Fatal error: Call to undefined method GalleryPhotoItem::onLoad() in /path/to/htdocs/gallery/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 102


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-01 03:06 UTC] stripslashes at stripslashes dot net
The gallery link I provided ( is currently filtered from APC, so you cannot test the error there, only the expected result.
 [2006-07-01 14:22 UTC] stripslashes at stripslashes dot net
I have narrowed the problem down to the callery core class files (located in /path/to/htdocs/gallery/modules/core/) and this allows me to change the filter for APC to "-gallery.*\.class" (only the core class files), instead of globally disabling it on all gallery pages.  This should narrow down your search.
 [2006-07-07 05:43 UTC] gopalv82 at yahoo dot com
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PECL.

This is a throwback from a large set of bugs ...

Please enable dynamic_error in your apc.ini, which warns what files to filter out.

And 5.0.x is not very high on my list of versions to support.
 [2006-07-08 03:47 UTC] stripslashes at stripslashes dot net
I incorrectly labled the PHP version as 5.0.2, but I am actually running 5.1.2.  I fail to see another open bug report describing problems with Gallery.  Perhaps you can point me in the right direction.

Also, you can view php and apc info at and, respectively.
 [2006-07-08 03:48 UTC] stripslashes at stripslashes dot net
Why would the status be filed under "bogus" and not "duplicate"?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 12:01:28 2024 UTC