Problem with Gallery 3.0.4 and PHP 5.3

BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Wed, 2012-09-05 13:47

Hi, since HostEurope updated PHP to V5.3 my Gallery 3.0.4 is not running any more. Errorcode is: 324 (net::ERR_EMPTY_RESPONSE) Is there any Update or Bugfix for Gallery 3.0.4 that solves this problem?

http://gallery.klassik-karts.de/index.php

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Wed, 2012-09-05 19:06

I have the same problem since Host Europe updated to PHP v5.3. Is there hope to get the gallery3 running again ;-) ?

Gallery 3-3.0.4 with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Fri, 2012-09-07 08:59

Any news on this would be highly appreciated!

 
daoki

Joined: 2012-09-07
Posts: 1
Posted: Fri, 2012-09-07 11:59

we've got the same problem. Support of Host Europe said that they don't think that gallery will solve this problem.
but i can't imagine this.

i've googled and found something, but i don't understand it:
http://forum.netcup.de/anwendung/sonstige-anwendungen/3852-500-internal-server-error-gallery3/

any ideas?

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Fri, 2012-09-07 13:57

Gallery 3 becomes unusable because of PHP 5.3? I also can't imagine that. It's an essential part of my website.
Maybe someone from the Gallery3-Team could tell us something about this circumstances, please.
You're working on a patch to solve this, right ;-) ?

Gallery3: 3.0.4 with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-09-07 18:53

Does upgrading to an experimental version:
http://github.com/gallery/gallery3/zipball/master
help?
More specifically this change:
https://github.com/gallery/gallery3/commit/6b306cddc1f25ecfe054b0a1c9d0dc3536da51f6

I have 2 galleries running on:
PHP: 5.3.15-pl0-gentoo
and
PHP: 5.2.17
5.3.15 is even later than 5.3.14

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Sat, 2012-09-08 04:34

@floridave
thanks for your fast reply! Tried first the kohana.php change and then your experimental version.
Sorry for telling you that it didn't work for me. Same as before, no gallery available.
PLEASE find a way to fix this behavior.
Thank you very much!

Gallery3: 3.0.4 (3.0-911-g4001c10) with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Sat, 2012-09-08 08:02
Quote:
PLEASE find a way to fix this behavior.
Thank you very much!

Agree!

 
BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Sun, 2012-09-09 08:47
daoki wrote:
i've googled and found something, but i don't understand it:
http://forum.netcup.de/anwendung/sonstige-anwendungen/3852-500-internal-server-error-gallery3/

In Version 3.0.4 this problem is fixed:

// Store the Kohana output buffer. Apparently there was a change in PHP
// 5.4 such that if you call this you wind up with a blank page.
// Disabling it for now. See ticket #1839
if (version_compare(PHP_VERSION, "5.4", "<")) {
ob_end_clean();
}

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Sun, 2012-09-09 12:44

Well not really - uncommenting any occurrence of a call to ob_end_clean didn't help my installation (any, by the way, your's still isn't working either).

 
BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Sun, 2012-09-09 14:30

Sorry, this is what I wanted to say: Ive got 3.0.4 not running including the fix of this bug :)

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Sun, 2012-09-09 16:44

Same over here,

I am running 3.0.4 and on top manually commented out any calls "like" the ones in the post you mentioned -> zero effect ...

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Sat, 2012-09-15 08:28

If it becomes more complicated, I attached my phpinfo.php from Host Europe.
Hope, you find out, what causes this. And I know: maybe we need patience, right ;-) ?

Henry

Gallery3: 3.0.4 (3.0-911-g4001c10) with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
elfabio

Joined: 2011-10-03
Posts: 3
Posted: Mon, 2012-09-10 20:01

would really appreciate a solution as well.

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Tue, 2012-09-11 05:55

Funnily enough even HostEurope is mentioning in their FAQ for the PHP upgrade that the apllications G2 and G3 (which they even provided themselves via 1-click-installs until then) will no longer be working as the "authors didn't come up with a new version". Does that mean that the Gallery team even has been contacted weeks ago by HostEurope regarding this issue?

I REALLY HATE TO SAY THIS ... but it might be time to check the current version of Coppermine :-(((((((((((((((((

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Tue, 2012-09-11 11:52

Ok then - maybe this is just a sign from above.

I have to say goodbye - I migrated my Gallery 3 to another solution within an hour (I have been lucky, as it's a more or less closed system with some 20 registered users and no bigger integrations, meaning a "standalone" design).

Have good luck in the future!

And thank you for 7 1/2 good years (McRib Joined: 2005-01-31) ...

 
thf1973

Joined: 2012-09-11
Posts: 4
Posted: Tue, 2012-09-11 11:57

Ok, this is definitely the solution for the problem (tested it myself):

http://forums.zend.com/viewtopic.php?f=57&t=11953&start=10#p98848

The problem itself is a bug in ZendGuardLoader:

http://forums.zend.com/viewtopic.php?f=57&t=42383

ZendGuardLoader is activated by default by HostEurope:

http://faq.hosteurope.de/index.php?cpid=18444

Thomas

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-09-11 13:50
Quote:
Does that mean that the Gallery team even has been contacted weeks ago by HostEurope regarding this issue?

I did not see anything.
I'm getting frustrated with hosts that just turn the other way.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-09-11 13:56

Users of this host do you have access to your php.ini file?
If so can you specify a less important obfuscation level in your php.ini file (2 instead of 3),
zend guard loader does not crash:

zend_loader.obfuscation_level_support=2

If not can your host make this change?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Tue, 2012-09-11 15:12

@floridave
This is it, what I can change under Scripts at Host Europe:

Einstellung Status
PHP-Errors=Nur ins Logfile schreiben
PHP-RegisterGlobals=Serverstandard
PHP-mbstring.func_overload=Serverstandard
PHP-allow_url_fopen=Off
PHP-allow_url_include=Off
PHP-Magic-Quotes-GPC=Serverstandard
PHP-Zend-ZE1-Kompatibilität=Serverstandard
PHP-Register-Long-Arrays=Serverstandard
PHP-Session-Use-Trans-SID=Off
PHP-Allow-Call-Time-Pass-Reference=Serverstandard
PHP Suhosin Executor Allow Symlink=Serverstandard
PHP Suhosin Session Encryption=Serverstandard
PHP Suhosin Mail Protection=1
PHP Suhosin RPG Max Vars=Serverstandard
PHP5-Extensions einstellen=phtml php5 php4 php3 php
CGI-Extensions einstellen=cgi pl py sh rb
SSI-Extensions einstellen=
Directoryindex einstellen=index.html index.htm index.shtml index.php index.php4 index.php5 index.wml

I changed this for testing:

PHP-RegisterGlobals=on
http://www.php.net/register_globals

PHP-Zend-ZE1-Kompatibilität=on
(Zend Engine 1.0 (von PHP 4) compatibility mode)

but both with no visible effect/change. I went back to Serverstandard.
So I can't change this:
zend_loader.obfuscation_level_support=2

Is that the final solution or will there be other possibilities to get back access to gallery3?
So I wait to ask Host Europe for a change (if they would do it anyway).

@thf1973

Quote:
Ok, this is definitely the solution for the problem (tested it myself):

http://forums.zend.com/viewtopic.php?f=57&t=11953&start=10#p98848

Is it that? How to get this patch to work?

It looks like we could get back our (beloved) Gallery3, thats good news.. !!!

Henry

Gallery3: 3.0.4 with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
leifmedia

Joined: 2012-09-11
Posts: 1
Posted: Tue, 2012-09-11 16:41

I just made the changes above to the Kohana.php. Works fine, thanks!
Leif

 
thf1973

Joined: 2012-09-11
Posts: 4
Posted: Tue, 2012-09-11 17:15

@sunbeam11

Make the changes as described in the file "/system/core/Kohana.php" or use the attached file (save as *.php).

Also use the latest version of Gallery3, I had to update my installation.

Thomas

PS.: My web is hosted by HostEurope, too...

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Tue, 2012-09-11 18:45

@thf1973
ok, I updated (again) to the last snapshot gallery3-4001c10, made the changes to kohana.php -->no success.
Then I tried your attachment -->no success.
I could go for ../gallery3/index.php/upgrader and it upgrades my gallery, but it won't open. Same blank window as before.
I've made no other changes. Now we have a solution and my gallery won't come back to live.. . Any ideas why?

Henry

Gallery3: 3.0.4 (4001c10) with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
thf1973

Joined: 2012-09-11
Posts: 4
Posted: Tue, 2012-09-11 19:12

Hi, Henry!

I didn't use the snapshot. I just unpacked the lastest version from the official website, deleted the install folder, made the changes in "Kohana.php", deleted the old gallery3 files except the "var" folder from the webspace, uploaded the files to my webspace and that did the job. I don't know what the snapshot did to your database, I hope you have a recent backup.

Thomas

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Tue, 2012-09-11 19:39

Hi Thomas,

thanks for your fast reply!
Made a fresh install with 3.0.4, the changes in kohana.php and with your kohana.php --> no success.
Same blank window as before.

Henry

Gallery3: 3.0.4 with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
thf1973

Joined: 2012-09-11
Posts: 4
Posted: Tue, 2012-09-11 22:03

Hi, Henry!

I don't know if this helps, these are the script settings of my virtual server (Virtual Server Managed 5.0 L) from Host Europe:

PHP-Errors Nur ins Logfile schreiben
PHP-RegisterGlobals Serverstandard
PHP-mbstring.func_overload Serverstandard
PHP-allow_url_fopen On
PHP-allow_url_include Off
PHP-Magic-Quotes-GPC Serverstandard
PHP-Zend-ZE1-Kompatibilität Serverstandard
PHP-Register-Long-Arrays Serverstandard
PHP-Session-Use-Trans-SID Serverstandard
PHP-Allow-Call-Time-Pass-Reference Serverstandard
PHP Suhosin Executor Allow Symlink Serverstandard
PHP Suhosin Session Encryption Serverstandard
PHP Suhosin Mail Protection 1
PHP Suhosin RPG Max Vars Serverstandard
PHP5-Extensions einstellen phtml php5 php4 php3 php
CGI-Extensions einstellen cgi pl py sh rb
SSI-Extensions einstellen
Directoryindex einstellen index.html index.htm index.shtml index.php index.php5 index.wml index.xml

I just rechecked the changes in "Kohana.php": Without the changes the gallery only displays a blank window, with the changes everything works just fine.

Thomas

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-09-11 23:49
Quote:
the changes in kohana.php and with your kohana.php --> no success.

Just guessing here: Kohana.php not kohana.php
thf1973: Thanks!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Wed, 2012-09-12 04:48

@floridave
It's Kohana.php, not kohana.php. I wrote it wrong in this posts.

@thf1973
Changed everything as you showed above at the Host Europe Settings -->no success.

Hope I find out, why it don't work in my case.

Henry

Gallery3: 3.0.4 with 857 pics in 15 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Wed, 2012-09-12 08:44

Is there somebody of the Developer Team out there reading this forum? Maybe you can give us an idea what the problem is, if it's too rare or too big to fix it soon... or whatever. I have to find a stable gallery solution for the future, I just can't leave the gallerys not running too long...

 
Stefanix

Joined: 2010-12-29
Posts: 5
Posted: Wed, 2012-09-12 11:59

Hello, I am also a Hosteurope customer using the Virtual Server Managed (5.0?). My two G3 unstallations show empty screens ("The connection was reset").
I installed 3.0.4, replaced the Kohana.php with the one posted here and executed the upgrader sucessfully. Unfortunately the same result, blank screen.

Thanks for all the effort here, but I am also looking for an alternative now.
McRib: What is your solution? To which gallery did you migrate? Could you get you G3 data transferred?

Thanks!
-Stefanix

 
McRib

Joined: 2005-02-01
Posts: 13
Posted: Wed, 2012-09-12 15:54

You've got PM, Stefanix!

 
BongoFury

Joined: 2012-09-05
Posts: 6
Posted: Wed, 2012-09-12 20:41

I made the changes in Kohana.php too and it works as far I see until now. Thanks for that!

 
ingeva
ingeva's picture

Joined: 2012-06-10
Posts: 4
Posted: Thu, 2012-09-13 08:40

I've used Gallery for more than a year and have had it running smoothly most of the time.
However, lately the slideshow tends to stop working. While loading the first image, the
progress bar stops and the picture is not shown.
This may have happened after I upgraded to 3.0.4, but I'm not sure.
I have re-installed from scratch, but at some point the error returns, and I have no idea
why. Right now the problem only exists on my local sever:

Operating system: Linux 3.3.6-030306-generic
Apache: Apache/2.2.22 (Ubuntu)
PHP: 5.3.10-1ubuntu3.3
MySQL: 5.5.24-0ubuntu0.12.04.1
Server load: 0.51 0.54 0.63
Graphics toolkit: gd

but everything is OK on the webhost (for now). So I have downloaded all the files
from the server and also restored the database, but then something gets disorganized
and it shows all kinds of errors even if the files and database are identical - except
of cource for the database configuration file, which I did NOT change.

Any ideas?

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Thu, 2012-09-13 18:57

Finally I found out, that the GreyDragon Theme which I use and the changes Host Europe made with PHP 5.3 are not compatible.
The last working version of the GreyDragon Theme for me is 2.75. All newer ones causes the blank screen.
[EDIT] Delete greydragon_theme.php in the versions >2.75 of the GreyDragon Theme and all is working again!

@thf1973
The patch you provided works like a charm!
And thanks man for your patience and the details of the script settings from Host Europe. They are needed to run gallery3 successfully!

@floridave
Will this patch find its way into the next snapshots as a standard?

Fine to be back again with Gallery3!

Henry

Gallery3: 3.0.4+ with 1137 pics in 17 albums
Apache: 2.2 - PHP: 5.3.14 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-09-14 00:23
Quote:
@floridave
Will this patch find its way into the next snapshots as a standard?

Did anybody file a bug? Not sure if a bug with; ZendGuardLoader / host specific not working with simple php scripts, is the way to go here.
Not my call.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Stefanix

Joined: 2010-12-29
Posts: 5
Posted: Fri, 2012-09-14 15:54

My galleries do work again. I switched my hosting package. I used a "Managed Server" before, which is basically a hosting package with own IP and some guaranteed resources, back to a pure VPS. This means I have to maintain the server, install updates, etc, myself. But I know what's going on and nobody installs updates which are incompatible with my applications.
Still, I don't understand the root cause. I had PHP 5.3 before and after, and I did not do the Kohana.php patch, but it works on the new VPS.
Hosteurope wrote that Gallery3 uses an outdated version of the Kohana framework, which is incompatibe with PHP 5.3, and Gallery should update.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-09-14 22:04
Quote:
Still, I don't understand the root cause.

Zend guard loader:
http://forums.zend.com/viewtopic.php?f=57&t=42383

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Stefanix

Joined: 2010-12-29
Posts: 5
Posted: Sat, 2012-09-15 05:35

Hi Dave and others,

I don't know too much of this, but this is my understanding so far:
The Zend Loader is needed to load obfuscated PHP code.
I checked both phpinfo() printouts, from my old host, which showed the blank screen, and my new host, on which Gallery3 works OK. On the old host PHP has the Zend Guard Loader extension, on the new one there is no Zend Guard Loader.
OK, the Zend Guard Loader is the problem. But if there is obfuscated code, shouldn't be the Zend Guard Loader mandatory? Why does it work without it on my new host?
Gallery3 works OK for me now, but I'd like to understand the problem. ;) And I guess this issue is not yet resolved for many others.

Attached both phpinfo(); from my two hosts.

Cheers
Stefan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-09-17 02:28
Quote:
The Zend Loader is needed to load obfuscated PHP code.

G3s code is not obfuscated PHP code.

Quote:
OK, the Zend Guard Loader is the problem.

Seems that way from this report: http://forums.zend.com/viewtopic.php?f=57&t=42383

Quote:
Why does it work without it on my new host?

because your new host does not have Zend Guard Loader running.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
winfree

Joined: 2012-09-21
Posts: 1
Posted: Fri, 2012-09-21 14:09

I had the same issue with my provider hosteurope as told above. After patching/exchanging Kohana.php with the provided script, it worked. I could see the start page.

When I tried now to add an album as a new user (with admin rights) I got the following error messages:

ORM_Validation_Exception [ Database Error ]: ORM Validation has failed for items model

    SYSPATH/libraries/ORM_Validation_Exception.php[ 20 ]
    15 * @param Validation $array 16 * @return 17 */ 18 public static function handle_validation($table, Validation $array) 19 { 20 $exception = new ORM_Validation_Exception('ORM Validation has failed for :table model',array(':table'=>$table)); 21 $exception->validation = $array; 22 throw $exception; 23 } 24} // End ORM_Validation_Exception

    SYSPATH/libraries/ORM.php[ 755 ] » ORM_Validation_Exception_Core::handle_validation( Argumente )

    MODPATH/gallery/models/item.php[ 773 ] » ORM_Core->validate( Argumente )

    SYSPATH/libraries/ORM.php[ 778 ] » Item_Model_Core->validate()

    MODPATH/gallery/libraries/MY_ORM.php[ 34 ] » ORM_Core->save()

    MODPATH/gallery/libraries/ORM_MPTT.php[ 79 ] » ORM->save()

    MODPATH/gallery/models/item.php[ 373 ] » ORM_MPTT_Core->save()

    MODPATH/gallery/controllers/albums.php[ 127 ] » Item_Model_Core->save()

    {PHP Interer Zugriff} » Albums_Controller->create( Argumente )

    SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( Argumente )

    {PHP Interer Zugriff} » Kohana_Core::instance( Argumente )

    SYSPATH/core/Event.php[ 208 ] » call_user_func_array( Argumente )

    APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( Argumente )

    DOCROOT/index.php[ 113 ] » require( Argumente )

Getting back I can see the new album but it is not writable (no upload of photos possible) and there are no options shown which I can change. Only the main album "Gallery" has options I can change.

 
Yogie

Joined: 2003-07-03
Posts: 19
Posted: Thu, 2012-09-27 08:30

Finally Host Europe fixed the settings on 26.09.2012 17:53 so for me I could revert back to the original Kohana.php file and Gallery 3 is still working.

This is what their log for the short downtime while fixing says (German!):

Quote:
Aktualisierte Konfiguration für Zend Guard Loader.
Durch einen Bug im Zend Guard Loader kann es je nach Programmierung zu einem Segfault des Webserver Unterprozesses kommen.
"Empty Response" ist in einigen Fällen die Fehlermeldung des Browsers.
Der Webserver wird zum aktivieren der Konfiguration neu gestartet.

 
trainwreckd

Joined: 2009-07-13
Posts: 9
Posted: Fri, 2012-09-28 01:16

I too have found that Gallery and PHP 5.3 do not get along on Rackspace's Cloud platform.
I'm using this platform for an important client. Anyone got any good alternatives to get me up and running?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-09-28 02:47
Quote:
Durch einen Bug im Zend Guard Loader

I think that google translate will say:

google translate wrote:
By a bug in the Zend Guard Loader

3 options:
ask your host to fix the bug or remove Zend Guard Loader or patch G3 with what was posted above.

I don't think that G3 should patch their software to fix yet another software, where do we stop?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sunbeam11
sunbeam11's picture

Joined: 2010-10-15
Posts: 23
Posted: Thu, 2012-10-04 15:25

Since HostEurope actualized their Zend Guard Loader Configuration I was able to install the newest G3 snapshot
without any changes in the Kohana.php. I also reverted back to my original Script settings from HostEurope.
Everything just works fine and as expected.
Thanks to all of you for providing parts of the solution to run G3 successfully again!

Henry

Gallery 3.0.4+ with 1137 pics in 17 albums
Apache: 2.2 - PHP: 5.3.16 - MySQL: 5.5.27-1 - Graphics toolkit: gd

 
cjcraven

Joined: 2012-12-18
Posts: 3
Posted: Wed, 2012-12-19 01:04

I seem to be having similar issue with host upgrade to PHP 5.3.13 (Zend 2.3.0) and my Gallery 3.0.4. This thread is 2 months old - has a resolution been found?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-02-18 14:48

Can you verify that this fix:
https://github.com/shadlaws/gallery3/commit/110123f7cf7674368459c8bbd236471e01e5c183
works for the segmentation fault in Zend Guard issue. With this fix we are not modifying a core Kohana file.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team