eAccelerator caching breaks Gallery

Sjord

Joined: 2006-09-08
Posts: 7
Posted: Fri, 2006-09-08 14:55

When I enable the eAccelerator caching, thumbnails in Gallery2 do not load and I often get the following error:

Fatal error: Call to undefined method GalleryPhotoItem::onLoad() in /pub/www/coelacanth/fotos/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 91

or

Fatal error: Call to undefined method GalleryDerivativeImage::onLoad() in /pub/www/coelacanth/fotos/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 91


Gallery versie = 2.2-svn core 1.1.16
PHP versie = 5.1.6 apache2handler
Web server = Apache/2.0.59 (Unix) DAV/2 SVN/1.2.3 PHP/5.1.6
Database = postgres7 8.1.4 3 8.1.4, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, Gd
Versnelling = full/86400, full/86400
Operating system = Linux server 2.4.31 #28 Wed Sep 14 21:15:45 CEST 2005 i686
Standaard thema = matrix
gettext = enabled
Talen = nl_NL
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.4) Gecko/20060406 Firefox/1.5.0.4 (Debian-1.5.dfsg+1.5.0.4-1)
eAccelerator version = v0.9.6-dev

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Fri, 2006-09-08 20:38

already tried older (stable) versions of eaccelerator?

Login or register to post comments
Sjord

Joined: 2006-09-08
Posts: 7
Posted: Sat, 2006-09-09 09:50

No, I could not get an older version of eAccelerator to work on my server. It could very well be a bug in eAccelerator. I sent a mail to eaccelerator-users.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Sat, 2006-09-09 10:54

If you look at the class hierarchy, GalleryDerivativeImage extends ... extends GalleryEntity. Thus GalleryDerivativeImage is a GalleryEntity.
GalleryEntity has a method onLoad() and the call in GalleryEntityHelper_simple.class is an instance method call, not a static method.

Thus the PHP code is correct.
I bet it works if eaccelerator is disabled.

Not quite sure what to think about it since eaccelerator used to work with G2.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Sat, 2006-09-09 10:54

already cleared your eaccelerator (disk) cache?
you need to do that after each svn update.

Login or register to post comments
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Mon, 2006-09-11 08:37

Hi, running PHP 5.1.6 with eAccelerator here without problems - did you use the proper dll? (there is an updated eAccelerator.dll for PHP 5.1.6 at Sitebuddy, which is still reported as 0.9.5-RC1). 0.9.6 is already perparing for PHP 5.2 as far as I know.

Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de

Login or register to post comments
Sjord

Joined: 2006-09-08
Posts: 7
Posted: Mon, 2006-09-11 16:43

Thanks for the feedback. I compiled my own eAccelerator. I can't use DLLs, because I run Linux.

Login or register to post comments
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Mon, 2006-09-11 18:47

Oops ... Sorry (I'm still stuck to the windows environment - knowing a few people who are eagerly trying to "convert" me :))

Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de

Login or register to post comments
rukka74

Joined: 2006-09-11
Posts: 7
Posted: Tue, 2006-10-17 09:22

Hi,

I am running G 2.1.2 on a PHP 5.1.2/Apache 1.3.33 installation (linux). In fact a had the same problems as the original poster when running eaccelerator 0.9.5-rc1. The error occurs on various ::onLoad() functions, not only the ones mentioned above. Since I was using an unstable release of eaccelerator I have patiently waited for 0.9.5 which has been released a few days ago. Unfortunately the problems are still there.

I have no idea if this is a eaccelerator issue or g2 issue. Maybe you G2 developers have a link to the guys from eaccelerator?

Cheers
Chris

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Tue, 2006-10-17 10:13

If G2 works on your server without an opcode cache and then has problems with the opcode cache, you can be certain that it's due to the opcode cache.
E.g. if there's a php error once the opcode cache is enabled and you ensured that the opcode disk / memory cache has been cleared, and the problem persits, it's due to a bug on that opcode cache.

Having said this, G2.1.2 / Gallery 2.2-svn works fine with PHP 5 and eaccelerator on Windows and linux. I've tested this on my own box, it's running like that on gallery.menalto.com and other users are using it as well.

You'll have to further isolate your problem to have a useful bug report for the eaccelerator guy. The Gallery project has no special link to the eaccelerator project.

Login or register to post comments
rukka74

Joined: 2006-09-11
Posts: 7
Posted: Tue, 2006-10-17 10:50

threre you have a point :-)
the gallery works fine without eaccelerator, hence it's their issue.

With which php and eaccelerator version did you test gallery 2.1.2 on linux? Note that eaccelerator 0.9.4 only supports php upto 5.0.x, since I run 5.1.2 I have to use the latest release which is 0.9.5.

So if it worked in your case with 0.9.4 and php 5.0.x I could consider a downgrade and I could tell the eaccelerator guys that this problem seems to be "new".

Thanks
Chris

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Tue, 2006-10-17 10:58

I'm using eaccelerator 0.9.5 (rc1 on windows, stable on linux) every once in a while. PHP 5.1.6, apache2 on windows and linux.

the other user from this thread uses apache2, so it's not a apache 1 vs 2 issue.
the other user is using php 5.1.6, so it's probably neither a php 5.1.2 issue.

Login or register to post comments
rukka74

Joined: 2006-09-11
Posts: 7
Posted: Thu, 2006-10-19 09:10

Hi again,

since it is a "sometimes it works, sometimes it does not" type of problem, the cause might be in the configuration of eaccelerator. Since the eaccelerator guys are not the most communicative ones (I am sure they are very busy with whatever) I keep bothering you, my appologies.

But maybe you cold provide me with your eaccelerator ini settings used in you php.ini on your linux box?
Further, if you have built the linux binaries of eaccelerator yourself, you might even remember the configure parameters you have used?

Help would really be appreciated.

Regards
Chris

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Thu, 2006-10-19 10:03

default options, i just put the compression level to 1 since that usually doesn't help much compared to its price (cpu load).

; eaccelerator
eaccelerator.shm_size = "0"
eaccelerator.cache_dir = "C:\[.....some path, censored... ]
eaccelerator.enable = "1"
eaccelerator.optimizer = "1"
eaccelerator.debug = 0
eaccelerator.name_space = ""
eaccelerator.check_mtime = "1"
eaccelerator.filter = ""
eaccelerator.shm_max = "0"
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period = "0"
eaccelerator.compress = "1"
eaccelerator.compress_level = "1"
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"

Login or register to post comments