[Solved] Call to undefined method GalleryPhotoItem::onLoad()

aapol

Joined: 2005-10-21
Posts: 4
Posted: Fri, 2005-10-21 12:30


Gallery version (not just "2"): 2.0.1
PHP version (e.g. 4.3.11): 5.0.4-pl1-gentoo
Webserver (e.g. Apache 1.3.33): 2.0.54-r31
Database (e.g. MySql 4.0.11): 4.1.14
Activated toolkits (e.g. NetPbm, GD): All.
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 1.0): IE, Firefox, Opera etc.

I get this error after upgrading (via patch) to Gallery 2.0.1:

Fatal error: Call to undefined method GalleryPhotoItem::onLoad() in /var/www/multisite.gallery.fchaps.com/htdocs/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 98

Test url:
http://bungle.gallery.fchaps.com/miscellaneous/wallpapers/Hydra.jpg.html

 
aapol

Joined: 2005-10-21
Posts: 4
Posted: Fri, 2005-10-21 13:30

More Info:

Gallery version = 2.0.1 core 1.0.0.1
PHP version = 5.0.4-pl1-gentoo apache2handler
Webserver = Apache
Database = mysqlt 4.1.14-log
Toolkits = ArchiveUpload, Exif, Ffmpeg, Gd, NetPBM, SquareThumb, Thumbnail, ImageMagick, Dcraw
Operating system = Linux pasanen 2.6.13-rc2-mm2 #2 Fri Jul 15 13:16:34 EEST 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)

When going to http://bungle.gallery.fchaps.com/lib/support/ it gives me:

Error (ERROR_MISSING_OBJECT) : Parent 7 path lib
in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 118 (ShowItemView::error)
in modules/core/classes/GalleryCoreApi.class at line 1762 (ShowItemView::fetchChildIdByPathComponent)
in modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class at line 63 (ShowItemView::fetchChildIdByPathComponent)
in modules/core/classes/GalleryCoreApi.class at line 1708 (ShowItemView::fetchItemIdByPath)
in modules/core/classes/GalleryView.class at line 344 (ShowItemView::fetchItemIdByPath)
in modules/core/classes/GalleryView.class at line 219 (ShowItemView::_getItem)
in main.php at line 287 (ShowItemView::doLoadTemplate)
in main.php at line 87
in main.php at line 80
in /var/www/bungle.gallery.fchaps.com/htdocs/main.php at line 3

 
aapol

Joined: 2005-10-21
Posts: 4
Posted: Fri, 2005-10-21 14:29

Solved. The problem was in pecl/apc. When I disabled it the Gallery started to work fine.

 
aapol

Joined: 2005-10-21
Posts: 4
Posted: Fri, 2005-10-21 15:34

I didn't want to disable the whole pecl/apc because the only thing that caused problems was Gallery 2.0.1. I configured apc to exclude Gallery 2.0.1 files and now I can use bytecode cache everywhere else. Here is my apc configuration:

extension=apc.so
apc.enabled="1"
apc.shm_segments="1"
apc.shm_size="64"
apc.optimization="0"
apc.num_files_hint="1000"
apc.ttl="0"
apc.gc_ttl="3600"
apc.cache_by_default="1"
apc.filters="-Gallery.*\.class"
apc.mmap_file_mask="/tmp/apc.XXXXXX"
apc.slam_defense="0"
apc.file_update_protection="2"

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-10-21 15:40

we're using APC on this website here.
drupal works fine with APC. G2 has some problems. we need to restart the webserver due to G2/APC every x days when we get an error.

G2 uses a lot of PHP functions and a lot of PHP 4.x object oriented features, so it could well be that APC doesn't handle all PHP functions / features correctly. the author of APC, also a Gallery user, knows about the issue.