PLEASE HELP - 500 Internal Server Error when upgrading from 2.2.3 to 2.3 (nightly)

totem

Joined: 2008-03-04
Posts: 23
Posted: Thu, 2008-05-08 03:05

Hi,

I'm stuck in between versions of gallery and need your help. I was trying to upgrade from 2.2.3 to 2.3 so that I can get the Piclens support. In step 4:

Currently installed Core Module version: 1.2.0.5 (Gallery 2.2.3)
New version Core Module version: 1.2.33 (Gallery 2.3-svn)
Config.php upgrade Required

after hitting the "begin upgrade" button, it goes into a 40 - 50 sec, and then returns with a 500 Internal Server Error message.

What I've done:
1. Uploaded a "php.ini" file to the "gallery" directory with the contents:
max_execution_time = 300
memory_limit = 64M
mysql.connect_timeout=300
[Session]
session.save_path="/home/users/web/b115/ipw.campanas/public_html/cgi-bin/tmp"

2. Tried to get the error log, but there's no contents in the file "cgi_error_log"

3. Added the following code to gallery/upgrade/index.php see if I can get more info:

   error_reporting(0); 
   $old_error_handler = set_error_handler("userErrorHandler");
 
   function userErrorHandler ($errno, $errmsg, $filename, $linenum,  $vars) 
   {
     $time=date("d M Y H:i:s"); 
     // Get the error type from the error number 
     $errortype = array (1    => "Error",
                         2    => "Warning",
                         4    => "Parsing Error",
                         8    => "Notice",
                         16   => "Core Error",
                         32   => "Core Warning",
                         64   => "Compile Error",
                         128  => "Compile Warning",
                         256  => "User Error",
                         512  => "User Warning",
                         1024 => "User Notice");
      $errlevel=$errortype[$errno];
 
      //Write error to log file (CSV format) 
      $errfile=fopen("errors.csv","a"); 
      fputs($errfile,"\"$time\",\"$filename: 
      $linenum\",\"($errlevel) $errmsg\"\r\n"); 
      fclose($errfile);
 
      if($errno!=2 && $errno!=8) {
         //Terminate script if fatal error
         die("A fatal error has occurred. Script execution has been aborted");
      } 
   }

Which results in only "notice" messages:
"07 May 2008 22:57:35","/hermes/bosweb/web011/b115/ipw.campanas/public_html/gallery/modules/core/classes/Gallery.class:
275","(Notice) Undefined index: multisite"
"07 May 2008 22:57:36","/hermes/bosweb/web011/b115/ipw.campanas/public_html/gallery/modules/core/classes/Gallery.class:
275","(Notice) Undefined index: repository.url"

Do I need to restart the apache server for the new php.ini to take place? (need to ask my hosting company to do this I think)

Please give me some pointers to solve my problem. I've been fighting this for the past couple of days.

PHPInfo: http://campanas.net/gallery/phpinfo.php
Thanks


Gallery version = 2.2.3 core 1.2.0.5
PHP version = 4.4.7 cgi
Webserver = Apache

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 23
Posted: Wed, 2008-05-14 04:42

guys/gals, I really need help. My hosting company is saying that the PHP script timeouts on the servers is 60 seconds and there's no way they can change it:

Quote:
We apologize for any inconvenience this may have caused you. I have reviewed your issue. The execution time for PHP scripts is 60 seconds on our platform. This cannot be changed. You need to contact the support for the Application and have the script changed so that it will execute within 60 seconds. Please confirm it from your end. I once again apologize for any inconvenience this may have caused you

I told them that they would run into many people in the future trying to upgrade their gallery2 site to the latest one.

I'm in between installations and I need to know either how to go back to 2.2.3 or successfully upgrade to 2.3. Is there anything I can do manually to do the upgrade to 2.3?
Is there any way to have the upgrade scripts spit out the trace to see exactly where it is timing out?

Please help!

thanks

Login or register to post comments
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 131
Posted: Wed, 2008-05-14 08:21

I think it's poor coding on the part of Gallery that it doesn't do this in smaller stages as webserver applications should never be in process loops for too long. A good example of how this is done is to look at phpBB when it processes many records.

I had the same issue with my own server and I was not prepared to increase the timeout simply to upgrade - I just reverted the code and database back to 2.2.4

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.6 cgi-fcgi
Webserver = Microsoft-IIS/6.0
Database = mysqlt 5.0.51a-community-nt, lock.system=database
Toolkits = Dcraw, Ffmpeg, ImageMagick, Gd, LinkItemToolkit, Thumbnail, jpegtran, Exif
Acceleration = full/900, none/0
Operating system = Windows NT 5.2 build 3790
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050606 Minefield/3.0pre

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 23
Posted: Wed, 2008-05-14 17:11

Thanks Taomyn. How would I go about reverting back to the previous version? I have no idea which files have been upgraded and which haven't. I'm not even clear what an 'upgrade' means, is it just a replacement of the files/directory?

Should I just upload the files from the previous version to the server?

thanks

Login or register to post comments
bharat
bharat's picture

Joined: 2002-05-21
Posts: 4964
Posted: Thu, 2008-05-15 17:04

Check your g2data directory for upgrade log files. Those should give us the information that we need to fix this. Please PM a link to them to me (don't share them with the public, they have sensitive information).

What happens if you try to run the upgrader a second time?

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 23
Posted: Thu, 2008-05-15 20:25

If I try the upgrader for a 2nd, 3rd, 4th...nth time, it gives the same error message, it pretty much times out after ~50 seconds. Since it times out at different times, the upgrade logs are different from one to another - sometimes it cuts off before than others.

I just PM you how to get to the files. Thanks for the help.

Is there any way to install a fresh installation in another directory (in the same server) and do an import of the data? Would that work? Would my existing links still work the same (assuming I can get to rename the directory the same as before?)

thanks

Login or register to post comments
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 131
Posted: Fri, 2008-05-16 08:07

As with any test of a pre-release, I made a backup of the entire code area for the gallery and also dumped the MySQL database. I just reverted back to those once I had the problem.

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.6 cgi-fcgi
Webserver = Microsoft-IIS/6.0
Database = mysqlt 5.0.51a-community-nt, lock.system=database

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 23
Posted: Fri, 2008-05-16 18:32

I didn't backup the "gallery" folder, but did backup the database. I guess I can re-upload the "gallery" folder/files that I have on my local PC, and revert to the backed up database...

Maybe I'll do that...

Login or register to post comments