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) 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: 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: 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
|
|
| Login or register to post comments |

Posts: 23
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:
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
Posts: 131
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
Posts: 23
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
Posts: 4964
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?
Posts: 23
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
Posts: 131
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
Posts: 23
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...