500 internal server errror

MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Mon, 2009-07-27 19:02

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): www.minibandits.com/gallery
Gallery version: I think it's 1.5.7 (that's the latest version of the files on my pc so it must be - haven't gone into config wizard...
Apache version:2.2.11 (Unix)
PHP version (don't just say PHP 4, please):5.2.5
Graphics Toolkit:DK sorry
Operating system:XP
Web browser/version (if applicable): Firefox /3.0.12

Full error message;
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator,

and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.minibandits.com Port 80

Looks like I'm way behind on upgrades again, sorry. Gallery is one of these great progs that just keeps on working, I know last time it went wrong it was because my host upgraded the php version and an upgrade fixed it. I'm assuming this is probably something similar.

Anyway, it was working fine this morning, now getting the 500 internal server error. I'm awaiting hearing back from the hosting company to see if it's anything they've changed.

Any help much appreciated. Whilst I'm guessing it will be an upgrade of some sort, a simple fix if possible to get it going in the short term would be nice as I'm out the next couple of days then going on holiday, so really don't need this, although I promise I will do a bigger upgrade if necessary when I get back!

Thanks,

Kay

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 19:04

Check the server's error logs or have your host do that. That should give a bit more of a clue as to what's happening:
FAQ: What is the webserver error log?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Mon, 2009-07-27 19:15

I only seem to be able to get at the last 300 errors, all of which appear to be the same as this:

[Mon Jul 27 20:12:25 2009] [error] [client 118.98.160.74] File does not exist: /home/miniband/public_html/500.shtml
[Mon Jul 27 20:12:25 2009] [alert] [client 118.98.160.74] /home/miniband/public_html/gallery/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 20:26
Quote:
/home/miniband/public_html/gallery/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

Perfect! It's not liking something in your .htaccess file. Can you post the contents of that or any lines that have php_value in them?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Mon, 2009-07-27 20:58

# BEGIN Gallery section
# (Automatically generated. Do not edit this section)
# Note: still under development, so format may change.
# If you edit this file, make a backup before runnng the Config. Wizard.

php_value post_max_size 20971520
php_value upload_max_filesize 20971520
php_value magic_quotes_gpc off
php_value session.save_handler files
php_value register_globals off

Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /gallery/view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /gallery/view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$ /gallery/$1 [R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$ /gallery/view_album.php?set_albumName=$1 [QSA]
</IfModule>
# END Gallery section. Add User changes below this line

Thanks for your help, much appreciated.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 21:04

I would first try commenting these lines out by adding a # sign at the beginning of the line, like so:

Quote:
#php_value post_max_size 20971520
#php_value upload_max_filesize 20971520
#php_value magic_quotes_gpc off
#php_value session.save_handler files
#php_value register_globals off

See if that works, then try commenting each line.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Mon, 2009-07-27 21:26

OK, tried that, commented them out and then got the following message:

Error: Your userfile is not writeable.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-07-27 21:48

Seems as though your host changed some settings. Make sure all files and directories below your albums directory are writable by the webserver. That may mean changing them to 777 (for directories) and 666 (for files). Probably a good time to contact your host, especially if this was working and now it's not.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Mon, 2009-07-27 22:07

Album directories are currently 775 or 755 (not sure why some are different). Files seem to be all 644.

I think it must be something the host has changed, I still haven't heard back from them. I'm inclined to see what they say before changing all the individual file settings. For now I've set everything back as it was. If they can't help I'll change the files.

I was expecting to hear that it was something like php version, either that or I'd been hacked or something. However I have another gallery with the same host and that has gone wrong as well, so I'd say it must be a server thing.

Thanks for your help, I'll let you know if/when I hear from the hosting company.

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Wed, 2009-07-29 20:26

The hosting company say they have made no changes so I'm back to square 1.

I guess I need to reinstall/upgrade to solve this. What's the easiest/safest upgrade route, bearing in mind I've not got much time around at the moment?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-07-29 20:40

Well those files could very well be 775 or 755, if the web server is creating them, 755 is the default permission Gallery applies to directories and 644 to files. But what's important is who owns the files and directories. So they must've changed something, like which user the web server runs as otherwise if the webserver owns the file or directory and it's 644 or 755, then that means who ever owns it can edit it.

See if your host will make sure that the file and directories are owned by the user the web server runs as.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Thu, 2009-07-30 08:46

Well I couldn't alter the directory protections, which suggests the host had altered something because surely if I was the owner I should have been able to? Anyway I asked them to do it for me, which they have now done, and it is working again!! Thankyou very much for your help, I'd never have fixed it without you.

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Tue, 2009-08-04 17:42

Well after the host fixed it, it went down again yesterday, and again today, so they have recompiled php on the server. Now I am getting the following:

Warning: fopen(/home/miniband/public_html/gallery/albums/albumdb.dat.lock) [function.fopen]: failed to open stream: Permission denied in /home/miniband/public_html/gallery/platform/fs_unix.php on line 66
Error: Could not open lock file (/home/miniband/public_html/gallery/albums/albumdb.dat.lock) for writing!

They have tried changing file protections, but it will not solve it.

Any ideas?

I've noticed the php version has now changed to 5.2.10 if that makes any difference.

I'll be offline for a few days now, but the hosting company may check back here.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-08-04 18:11

The server or PHP could not open the file. This sounds like a permissions issue. Tell your host that who ever the web server or php runs as needs to be able to edit ALL files and directories under the albums directory. Either they need to change ownership on the files and directories recursively or they need to change permissions to 777 for everything under albums.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MiniKay

Joined: 2004-03-16
Posts: 14
Posted: Wed, 2009-08-12 08:56

Thankyou, the host has changed a few things in response to your reply and it is working again now. :)