icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Gallery 2 Internal Server Error

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old April 7th, 2008, 4:24 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
17 posts
Gave thanks: 2
Thanked 0 times
Gallery 2 Internal Server Error

Firstly, I am sorry if this is a question that's been answered 1000 times - I've spent some time searching and can't find anything that sounds quite like what's happening to me. I need some advice please.

I am running Gallery 2 (version 2.2.1) on my webspace (server info in signature), it has worked fine for almost a year, so I assume the problem is related to the mySQL/PHP5 server upgrade at the end of March. I can't upload any new images to the gallery now; if it does work then viewing the images will always give me, and everyone else, an Internal Server Error. Building thumbnails won't work anymore either, and some of the admin stuff like deleting the database cache won't work.

I did try the .htaccess file to use PHP4 for the gallery (the file is placed in public_html/gallery - file content copied from the Surpass update information e-mail)) but it doesn't seem to have an effect - Gallery still tells me it is on PHP5. But I am not an expert on all this so I don't know if I need to do anything else?

This is the Gallery system information:
Gallery version = 2.2.1 core 1.2.0.1
PHP version = 5.2.5 cgi
Webserver = Apache/1.3.41 (Unix) mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
Database = mysqlt 5.0.45-community, lock.system=flock
Toolkits = ArchiveUpload, Exif, Gd
Acceleration = none, none
Operating system = Linux sh124.surpasshosting.com 2.6.9-55.0.9.ELsmp #1 SMP Thu Sep 27 18:28:00 EDT 2007 x86_64
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Rows in GalleryAccessMap table = 21
Rows in GalleryAccessSubscriberMap table = 1313
Rows in GalleryUser table = 38
Rows in GalleryItem table = 1313
Rows in GalleryAlbumItem table = 70
Rows in GalleryCacheMap table = 0

The cPanel error log contains a few Gallery entries from the end of March:
[2008-03-31 03:08:58]: error: file has no execute permission: (/home/ronankea/public_html/gallery/main.php)
but none from today as far as I can tell, except for missing 404.shtml or robots.txt files.
According to my FTP, I (assuming I am the owner) have Read, Write and Execute permissions on main.php.

I don't really know what I am talking about so I apologise if all of this is irrelevant info! Please can someone point me in the right direction?
__________________
http://ronankeatingnews.com
on Sh124
jusie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 7th, 2008, 7:57 PM   #2 (permalink)
eye
Lost in code...
Fresh Surpasser
 
Joined in Mar 2007
Lives in UK
Hosted on Sh120
20 posts
Gave thanks: 0
Thanked 2 times
Try and deleting (after backing up) your .htaccess file, I was getting the same error here with WordPress 2.5 after running it for a few days without problems and deleting the file sorted it out.
__________________
http://www.opcp.co.uk
Sh120
eye is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 3:45 AM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
17 posts
Gave thanks: 2
Thanked 0 times
Thank you, I will look into that again tonight, although I am pretty sure that the original .htaccess file in my gallery directory was completely empty and yesterday I copied the two PHP related lines into it and put that onto the server. No luck.
__________________
http://ronankeatingnews.com
on Sh124
jusie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 4:09 AM   #4 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
17 posts
Gave thanks: 2
Thanked 0 times
By the way, the images that won't display are in this album. I managed to upload them with the option to "Create thumbnails now" UNchecked, that worked, but obviously something else went wrong.
__________________
http://ronankeatingnews.com
on Sh124
jusie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 11:18 AM   #5 (permalink)
eye
Lost in code...
Fresh Surpasser
 
Joined in Mar 2007
Lives in UK
Hosted on Sh120
20 posts
Gave thanks: 0
Thanked 2 times
The first thing I'd do is upgrade to 2.2.4 as G2 is now up to that version, there is a 2.2.1 to 2.2.4 update file at Gallery site, I have a test install of G2 on a Surpass server (PHP5) and everything works OK and check if your permissions for the 'main.php' are 644 (highlight file and 'get info' in your ftp program).
__________________
http://www.opcp.co.uk
Sh120
eye is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 11:18 AM   #6 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,222 posts
Gave thanks: 18
Thanked 86 times
Make a file called info.php in your gallery folder with the following in it:
PHP Code:
<?php
phpinfo
();
?>
Run the script and I'm curious what it reports as the PHP version and the server API near the top. At least your gallery shows something after the upgrade, mine just displayed a big white page. (it's all working now, though).
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 11:19 AM   #7 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
Alright, I suggest taking a gander at this if you haven't already:

[MAJOR Changes] New servers installed with PHP5/MySQL5

As for the permissions, although the user (being you) have write, read, and execute permissions, the script doesn't. You will need to set the permissions to 755. Try this with the php.ini file at the top link and see if it works. =)
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 3:34 PM   #8 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
17 posts
Gave thanks: 2
Thanked 0 times
argh! I thought I'd almost got it solved (thak you everyone for your advice!)...Changed permissions for main.php to 755, uploaded php.ini, and deleted .htaccess again. The images that had returned the error before then showed up OK. Rebuilding thumbnails worked fine as well.

Still, I couldn't upload new images. I would copy Gallery's error message here but I can't even access the gallery at all anymore right now I had it copied in here and then Firefox decided to die.
Anyway, I got something that said ERROR_PLATFORM_FAILURE and upon searching I found out it was likely to be another permission related issue. I went to the lib/support/index.php folder of my installation, logged in, found options to change file permissions. I set it to Read/Write for everyone for the gallery folder in public_html and then thought I'd try the option that said Read/Write for owner, Read for everyone else.
Ever since that moment, I get nothing but Internal Server Errors for all pages of my gallery. I've tried changing permissions for main.php back to 755 but apparently that's not enough to even show the index page again.

I think I have pretty much mucked up file permissions altogether...What do I do?

Oh yeah PHP Info is here - except that it can't be viewed
__________________
http://ronankeatingnews.com
on Sh124
jusie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old April 8th, 2008, 3:51 PM   #9 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
17 posts
Gave thanks: 2
Thanked 0 times
cPanel's error log has lots of these entries - in case they contain any relevant info-

[Tue Apr 8 14:46:12 2008] [error] [client 82.124.159.160] Premature end of script headers: /home/ronankea/public_html/gallery/main.php
SoftException in Application.cpp:544: Directory "/home/ronankea/public_html/gallery" is writeable by group
__________________
http://ronankeatingnews.com
on Sh124
jusie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On