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
|
|
| Login or register to post comments |

Posts: 32324
already tried older (stable) versions of eaccelerator?
Posts: 7
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.
Posts: 32324
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.
Posts: 32324
already cleared your eaccelerator (disk) cache?
you need to do that after each svn update.
Posts: 1023
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
Posts: 7
Thanks for the feedback. I compiled my own eAccelerator. I can't use DLLs, because I run Linux.
Posts: 1023
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
Posts: 7
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
Posts: 32324
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.
Posts: 7
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
Posts: 32324
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.
Posts: 7
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
Posts: 32324
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"