An internal server error occurred. Please try again later.

coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-09 09:06

hi@all,

since about one week, my gallery3 does not work anymore. following error occours: "An internal server error occurred. Please try again later."
i did change nothing and last login by myself was on 24th of august. i got the information from my webhoster, that all scripts are working fine, only the gallery does not.
does anyone know the problem or has a proper solution?

thx, sebastian

---
gallery 3.0.2
webspace: webgo24.de
Apache 2.2.9 (Debian)
DAV/2
SVN/1.5.1
PHP/5.3.17
mod_ssl/2.2.9
OpenSSL/0.9.8g

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2012-10-09 12:34

Check the error logs from Gallery and have the host check error logs on the server.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-10-09 13:30
Quote:
.de

Ask you host if they are using Zend Guard Loader
http://sourceforge.net/apps/trac/gallery/ticket/1749

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Mon, 2012-10-15 14:55

where to find the error logs in the gallery folders? server logs are cleared by host since the last check-up. another idea from host was, if my gallery is still running with php 5.2. they changed to php 5.3 one week ago. how do i tell gallery 3.0.2 to use 5.3?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-10-15 16:05

G3 works just fine with php5.3. If you want to see what version is in use add a phpinfo link in your gallery3 directory:
FAQ: How do I create a phpinfo page?

Gallery3 logs are located in /gallery3/var/logs/

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Mon, 2012-10-15 16:31

for php version -> http://sevegnani.de/gallery3/phpinfo.php

log entry always the same -> <?php defined('SYSPATH') or die('No direct script access.'); ?>

and

2012-09-26 09:47:28 +02:00 --- error: File not found: login
2012-09-26 09:47:31 +02:00 --- error: File not found: login
2012-09-26 09:47:32 +02:00 --- error: File not found: login

and more errors from:

2012-09-15 19:52:49 +02:00 --- error: File not found: lib/images/favicon.ico
2012-09-15 19:52:49 +02:00 --- error: File not found: lib/images/favicon.ico
2012-09-15 19:52:58 +02:00 --- error: File not found: Wasserwacht/lib/images/favicon.ico
2012-09-15 19:52:58 +02:00 --- error: File not found: Wasserwacht/lib/images/favicon.ico
2012-09-15 19:53:07 +02:00 --- error: File not found: Wasserwacht/MRB-Pr-fung-F-ssen-2012/lib/images/favicon.ico
2012-09-15 19:53:09 +02:00 --- error: File not found: Wasserwacht/MRB-Pr-fung-F-ssen-2012/lib/images/favicon.ico
2012-09-15 19:56:18 +02:00 --- error: File not found: Snap-Shots/lib/images/favicon.ico
2012-09-15 19:56:19 +02:00 --- error: File not found: Snap-Shots/lib/images/favicon.ico

might be my last login?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-10-15 16:51

Ask you host if they are using Zend Guard Loader

Quote:
server logs are cleared by host since the last check-up.

Then they are generated again once you browse to http://sevegnani.de/gallery3/
The servers error log should yield a clue as to where it is failing.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Mon, 2012-10-15 17:06

[Mon Oct 15 16:33:09 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/gallery3
[Mon Oct 15 16:33:10 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/favicon.ico
[Mon Oct 15 16:33:49 2012] [notice] child pid 25582 exit signal Segmentation fault (11)
[Mon Oct 15 16:33:56 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/gallery3
[Mon Oct 15 16:36:21 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/gallery3
[Mon Oct 15 16:40:31 2012] [notice] child pid 26088 exit signal Segmentation fault (11)
[Mon Oct 15 16:42:37 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/gallery3
[Mon Oct 15 17:02:07 2012] [notice] child pid 2302 exit signal Segmentation fault (11)
[Mon Oct 15 18:14:31 2012] [notice] child pid 30424 exit signal Segmentation fault (11)
[Mon Oct 15 18:14:46 2012] [error] [client 89.204.130.208] File does not exist: /home/www/gallery3/gallery3
[Mon Oct 15 18:20:07 2012] [notice] child pid 26158 exit signal Segmentation fault (11)
[Mon Oct 15 18:50:03 2012] [notice] child pid 28207 exit signal Segmentation fault (11)
[Mon Oct 15 18:50:04 2012] [notice] child pid 25626 exit signal Segmentation fault (11)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-10-15 18:04
Quote:
exit signal Segmentation fault (11)

Ask you host if they are using Zend Guard Loader
http://sourceforge.net/apps/trac/gallery/ticket/1749

Dave

____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Mon, 2012-10-15 19:51

yes, they are using ZendGuard Loader. is there any solution? i don't know why the gallery is running for since a year without any problem - they must have installed ZendGuard within the last weeks. otherwise the problem may have other origin.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-10-16 00:00

Solutions in the ticket posted above.

Dave

____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-16 08:19

ok ... one last question: where to put the patch lines into kohana.php? any specific position in the script?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2012-10-16 12:19

@ccolsavag: Look for hints at the top of the patch about where to put it.

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-16 12:40
tempg wrote:
@ccolsavag: Look for hints at the top of the patch about where to put it.

sorry i'm tilt ... i'm not that php specialist ... where is the hint in this patch:

--- gallery3.orig/system/core/Kohana.php 2011-05-25 12:04:04.000000000 +0800
+++ gallery3/system/core/Kohana.php 2011-12-20 21:59:20.901236982 +0800
@@ -698,6 +698,26 @@
else
{
// The class could not be found
+ // twu2 begin
+ // avoid segmentation fault in Zend Guard
+ // because when ZendGuardLoader enable, it will try to load the same class again if it's not exist, then... it will try a random name, then segmentation fault
+ // so we keep the name first, then if it try again
+ // create a dummy class for it
+ //
+ // only check this if ZendGuardLoader exist
+ if (extension_loaded('Zend Guard Loader')) {
+ static $last_name = '';
+
+ // reject it first
+ if ($last_name !== $class) {
+ $last_name = $class;
+ return FALSE;
+ }
+ // create dummy one if try again
+ Kohana_Log::add('debug', 'create dummy class: '.$class);
+ eval("class $class { }");
+ }
+ // twu2 end
return FALSE;
}

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2012-10-16 12:54
coolsavag wrote:
gallery3/system/core/Kohana.php

Search the file for // The class could not be found.
There's only one instance, line 704.

Be sure to back up everything before you make any changes.

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-16 13:05

thank you ... i got it, so far. are the "+" signs in the patch important or just to highlight the patch lines?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-10-16 13:51

Some community member created:
http://codex.gallery2.org/Host_specific_issues_zend_guard
to help out.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-16 14:19

thx dave and tempg for supporting me.
i'll hope the patch will work. keep you informed.

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Tue, 2012-10-16 15:15

so far ... i patched gallery3/system/core/Kohana.php (see attachment).

i renamed Kohana.php to Kohana.old via FileZilla and uploaded the new Kohana.php to the server. After closing Firefox and restarting the browser, the message is still the same and gallery is not available. error_log from apache says:

[Tue Oct 16 16:58:21 2012] [notice] child pid 3586 exit signal Segmentation fault (11)
[Tue Oct 16 16:58:21 2012] [error] [client 89.204.139.232] File does not exist: /home/www/gallery3/favicon.ico

any mistakes from my side?

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Wed, 2012-10-17 17:56

anyone any idea?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2012-10-17 21:54

Lots of possibilities. Could be a typo. Could be a caching issue. Could be invalid code (but the code has worked for others). The site linked from the ticket is apparently down right now, but try to use that code to see if there's a difference. I also noticed that your code had quotes on line 708 that don't appear to be on the codex page.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-10-18 02:11

My host(s) don't have Zend guard loader to test but this file still works on my systems.
Rename the original gallery3/system/core/Kohana.php to Kohana.php.orig
and use the attached renaming to Kohana.php

no guarantees as I can't test.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Thu, 2012-10-18 11:34
floridave wrote:
My host(s) don't have Zend guard loader to test but this file still works on my systems.
Rename the original gallery3/system/core/Kohana.php to Kohana.php.orig
and use the attached renaming to Kohana.php

no guarantees as I can't test.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

i tried to ... didn't work :(

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-10-18 13:12

Try G2 or another host.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Thu, 2012-10-18 19:26

i tried following ... swiched to php 5.4.7 and restart of apache. now i have a blank page and following messages:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/share/extensions/no-debug-non-zts-20100525/gd.so' - /usr/share/extensions/no-debug-non-zts-20100525/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/share/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/share/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Thu Oct 18 21:11:59 2012] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.4.7 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Thu Oct 18 21:12:33 2012] [error] [client 78.43.69.108] File does not exist: /home/www/gallery3/favicon.ico
[Thu Oct 18 21:17:17 2012] [error] [client 78.43.69.108] File does not exist: /home/www/gallery3/favicon.ico
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory

i think i'll try re-installing G3. If the problem is still there, it must be a ZendGuardLoader problem or whatever :(

 
coolsavag

Joined: 2011-03-23
Posts: 15
Posted: Thu, 2012-10-18 21:25
coolsavag wrote:
i tried following ... swiched to php 5.4.7 and restart of apache. now i have a blank page and following messages:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/share/extensions/no-debug-non-zts-20100525/gd.so' - /usr/share/extensions/no-debug-non-zts-20100525/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/share/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/share/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Thu Oct 18 21:11:59 2012] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.4.7 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Thu Oct 18 21:12:33 2012] [error] [client 78.43.69.108] File does not exist: /home/www/gallery3/favicon.ico
[Thu Oct 18 21:17:17 2012] [error] [client 78.43.69.108] File does not exist: /home/www/gallery3/favicon.ico
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory
Failed loading /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: /usr/local/ZendGuardLoader-php-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so: cannot open shared object file: No such file or directory

i think i'll try re-installing G3. If the problem is still there, it must be a ZendGuardLoader problem or whatever :(

i don't know why, but yeah ... it is running.

i used the install file of 3.0.4 , moved /var /modules and the greydragon theme and tried to upgrade. Kohana.php and all the other files are not patched. version is still 3.0.2 displayed. some questionmarks are still in my mind.

 
cleverson.rocha

Joined: 2012-10-19
Posts: 3
Posted: Fri, 2012-10-19 22:44

Try this: http://codex.gallery2.org/Host_specific_issues_zend_guard

After, comment the line 755 in the file ../system/libraries/ORM.php.

My configuration: PHP 5.3.10 with Zend Guarder enabled.

Cleverson Leite da Rocha
Curitiba/PR/Brasil

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2012-10-20 03:47

cleverson.rocha,
I can't test this but can you explain the reason for commenting out line 755 of ORM.php
I don't see that step in any posts.

Dave
___________________________________________
Blog & G2 || floridave - Gallery Team

 
cleverson.rocha

Joined: 2012-10-19
Posts: 3
Posted: Sat, 2013-01-05 22:35

because a fake error alert is emitted when photos are posted with size and extension permitted.

Cleverson Leite da Rocha
Curitiba/PR/Brasil