PHP 5.3 upgrade

sparek

Joined: 2012-07-24
Posts: 2
Posted: Tue, 2012-07-24 15:18

We have noticed some issues with Gallery after upgrading our servers to PHP 5.3. All of the Gallery scripts seem to throw up a 500 Internal Server Error. What is causing this? How do we resolve this?

One user was using version 3.0.1 of Gallery. I suggested upgrading to Gallery 3.0.4, thinking that would fix the issue, but it does not seem to have fixed it. Other times we are seeing up to date Gallery version 3.0.4 also showing this Internal Server Error.

When I revert back to PHP 5.2 everything is fine. But I'd like to keep PHP 5.3, since PHP 5.2 is no longer being supported.

Any help would be appreciated.

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-07-24 21:37

I'm using PHP: 5.3.14 with G3.0.4 and it works fine.
What is in the Apache error logs for the 500 internal server error?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
sparek

Joined: 2012-07-24
Posts: 2
Posted: Tue, 2012-07-24 22:15

The Apache error log says Premature end of script headers.

New installs of Gallery 3.0.4 work on PHP 5.3. It's just when you were already using Gallery 3 (3.0.1 or 3.0.4) on a PHP 5.2 system and them upgrade to PHP 5.3 is when the problem occurs. I suspect this has something to do with ZendGuard and Zend Optimizer, but I don't know what the solution is.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-07-24 23:08
Quote:
I suspect this has something to do with ZendGuard and Zend Optimizer

Can you disable them?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Isabelle555
Isabelle555's picture

Joined: 2012-08-11
Posts: 1
Posted: Sat, 2012-08-11 05:14

Hi I am hosting on Bluehost. Any ideas how to find out which version of PHP my host is running? Please help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-08-11 06:03

FAQ: How do I create a phpinfo page?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Stevemlr75

Joined: 2012-08-20
Posts: 1
Posted: Mon, 2012-08-20 03:32

Bluehost currently runs PHP 5.2.x with Suhosin Patch.

If you would like to see the exact current version, please log into the cPanel and view the PHP version on left column.

 
Gael07

Joined: 2012-08-20
Posts: 1
Posted: Mon, 2012-08-20 17:03
Isabelle555 wrote:
Hi I am hosting on Bluehost. Any ideas how to find out which version of PHP my host is running? Please help.

I have the same problem in hostgator. So isn´t the fault of the host. Waiting for more answers :(

 
ronsnow
ronsnow's picture

Joined: 2009-04-04
Posts: 7
Posted: Tue, 2012-08-21 01:15

I am subscribing to this as I have the same problem on LunarPages and on AnHosting. Is there a quick fix? My family and neighborhood sites are down (php 5.3.15)

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2012-08-21 13:24

Try replacing the php.ini file.
Check file permissions.
Could be a problem if you're using fastcgi (DH).
Could be execution timeouts.
Could be a number of other things.

"Premature end of script headers" is kind of a general error message. If none of this works, ask the host to check the server's error log to see if there's anything more specific.

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2012-10-16 10:27

Hmmm.. my host is upgrading the server to PHP 5.3 and latest Apache 2.2 branch on October 23rd. Be interesting to see what happens with all my scripts.

- Mark H.

Using Gallery 3.0.4 - gallery.markheadrick.com

 
ronsnow
ronsnow's picture

Joined: 2009-04-04
Posts: 7
Posted: Sat, 2012-12-01 00:46

Has anyone found the fix(s) for this error? I did a clean install of 3.0.4 on Lunarpages shared hosting: Php 5.3.15, Apache 1.3.42, and MySQL 5.1.62-cll, and I am getting 500 error. I placed some debugging in Bootstrap.php and the script works until around line 57 or so: Failed at: Event::run('system.ready');

the Log trace is:
2012-11-30 01:54:18 -08:00 --- error: Exception [ 0 ]: @todo NO_USER_LIBRARY_CONFIGURATION_FOR: user
/home/geore2/public_html/gallery3/modules/gallery/libraries/IdentityProvider.php [ 145 ]
#0 /home/geore2/public_html/gallery3/modules/gallery/libraries/IdentityProvider.php(43): IdentityProvider_Core->__construct()
#1 /home/geore2/public_html/gallery3/modules/gallery/helpers/identity.php(147): IdentityProvider_Core::instance()
#2 /home/geore2/public_html/gallery3/modules/gallery/helpers/identity.php(118): identity_Core::guest()
#3 /home/geore2/public_html/gallery3/modules/gallery/helpers/gallery.php(60): identity_Core::active_user()
#4 [internal function]: gallery_Core::private_gallery(NULL)
#5 /home/geore2/public_html/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#6 /home/geore2/public_html/gallery3/system/libraries/Router.php(160): Event_Core::run('system.post_rou...')
#7 [internal function]: Router_Core::setup(NULL)
#8 /home/geore2/public_html/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#9 /home/geore2/public_html/gallery3/application/Bootstrap.php(62): Event_Core::run('system.routing')
#10 /home/geore2/public_html/gallery3/index.php(115): require('/home/geore2/pu...')
#11 {main}

System Error log shows:
[Fri Nov 30 16:29:53 2012] [error] [client 67.169.87.184] Premature end of script headers: /home/geore2/public_html/gallery3/index.php

I also modified (per http://gallery.menalto.com/node/103115) the modules/gallery/libraries/IdentityProvider.php

So I am stuck with two nonoperative Gallery installations.

It does not seem to me that a Gallery installation should be so hard, yet it seems - based on the forums - that many installations on various hosts are having issues. Can some one help me get this up and running. I have a neighborhood site and a family genealogy site down, at least in regards to Gallery features.

help help: I have several hours into researching/debugging this and trying various forum suggestions. If any of you past posters has an answer, please share it here.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-12-01 01:04

did you try gallery2?
G2 is easier to embed

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
ronsnow
ronsnow's picture

Joined: 2009-04-04
Posts: 7
Posted: Sat, 2012-12-01 14:03

It has been so long now, but the problem started with the server upgrades to PHP 5.3. This happened at Lunarpages and AnHosting. At that time, if I remember right, G2 stopped working and it was recommended to go to G3....

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2012-12-02 06:22
Quote:
Lunarpages shared hosting: Php 5.3.15, Apache 1.3.42, and

G3 requires Apache 2.
G2 does work with Apache 1.

Dave

 
ronsnow
ronsnow's picture

Joined: 2009-04-04
Posts: 7
Posted: Tue, 2012-12-04 02:06

I think I am going to give up.... I put the standard G_3.0.4 install on to another server running Apache 2.2.22, PHP 5.3.16 and I am still getting error 500/blank screen. With all of the work that has been put into Gallery2/3 its really too bad that so many people seem to have trouble installing G3. The install process seems quite fragile and, in many cases, requires manual changes and serious debugging on various host servers.

Gallery2 worked really well, and like you said, Gallery2 installed really smoothly. The reason I was going to G3 was because all my G2 stopped working with the PHP5.3 upgrades.

Bahrat, if you see this and have any ideas on how to get this working for our neighborhood website, please give me a call...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-12-04 02:28

G2 2.3.1 was released specifically to address PHP 5.3 issues. And G2 is now to 2.3.2 and is much more mature.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
dhk

Joined: 2012-12-08
Posts: 3
Posted: Sat, 2012-12-08 12:52

Has anybody tried PHP 5.4? My webhost (1and1.com) is permanently switching from PHP 5.2 to PHP 5.4 next spring. For now I can choose to run my site with either, and PHP 5.4 totally breaks Gallery: all pages display simply "Error". I'm running G2 2.3.1 at dougandneely.com. Thanks in advance!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-12-08 14:21

G2 2.3.1 is compatible with php 5.4 as long as php is configured correctly

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
sremick
sremick's picture

Joined: 2005-05-06
Posts: 47
Posted: Tue, 2013-02-26 14:24

Was there ever a definitive answer to this? I just found when I switched the PHP on my webhost from 5.2 to 5.3 to support Mediawiki, an already-installed Gallery 3 now kicks up a "503" error. So once again, some issue for when a G3 install was originally set up on PHP 5.2 and then you upgrade the PHP to 5.3 underneath it.

Unfortunately I'm at work right now so can't look into this too deeply yet, but wanted to get the feelers out to know what I should be looking at, or if someone already figured this out since posting to this thread last. Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-02-27 04:14
shadlaws wrote:
Hey everyone,

Re: the Kohana / Zend Guard Loader issue...

The fundamental problem here is that:
- Gallery v3.0.5 is based on the Kohana v2.4 framework
- Kohana v2.x is (in general) incompatible with Zend Guard Loader
- Zend Guard Loader is installed by default on many PHP 5.3 installations, even though many things (incl. Gallery) don't use it.

This explains why downgrading to PHP v5.2 often "fixes" the problem - it's not PHP; it's Zend Guard Loader.

So, there are two solutions:
- Modify Kohana v2.x to be more compatible. This was the approach we took, and it does work better on some installations.
- Turn off (or turn down) Zend Guard Loader. The gentlest way to do this is to change the "zend_loader.obfuscation_level_support" variable in your root php.ini. Default is typically 3, off is 0, and 2 typically works with Kohana. Note that this can't be changed in directory-specific php.ini files (i.e. the php.ini in Gallery won't do it).

Best of luck!

Take care,
Shad

I hope that helps.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team