Whatever, you saw it's not die but print, so i didnt saw the 500 header in ethereal.
You (2 auth) should check sequences and everything that could cause error in main.php and related scripts.
That would require additional data. Try modifying error's script so it gives the data then i'll dig into problem.
In file \gallery2\modules\core\ErrorPage.inc
if ($failsafe) {
/* A catastrophic failure has occurred so just dump the error out to the browser */
print '<h2>Error</h2>';
list ($ret, $isAdmin) = GalleryCoreApi::isUserInSiteAdminGroup();
if ($gallery->getDebug() || (!$ret && $isAdmin)) {
print $error->getAsHtml();
}
if ($gallery->getDebug() == 'buffered') {
print '<h3>Debug Output</h3><pre>' . $gallery->getDebugBuffer() . '</pre>';
}
}
replace it with:
if ($failsafe) {
/* A catastrophic failure has occurred so just dump the error out to the browser */
print '<h2>Error</h2>';
list ($ret, $isAdmin) = GalleryCoreApi::isUserInSiteAdminGroup();
print $error->getAsHtml();
print '<h3>Debug Output</h3><pre>' . $gallery->getDebugBuffer() . '</pre>';
}
Dont forget to backup files first, as this is just for research purposes.
I get ERROR_STORAGE_FAILURE when adding new photos or creating albums, what should I do?
In a mysql database this could be a problem with the g2_SequenceId table. To fix this in phpMyAdmin, find the g2_SequenceId table and click "Browse" to see the rows. If there are multiple rows click "Delete" for each row except the one with the largest value. If there is a single row then click the "SQL" button in the very upper left.. in the popup window type:
select max(g_id) from g2_Entity
and click Go. Find the largest id in the query results. Now go back to "Browse" for g2_SequenceId and click "Edit" for the one row there. Change the value to be one larger than the maximum id reported in the query. Note that the errors received previously may have left directories and files inside your g2data/albums directory that are not displayed by Gallery. To complete the cleanup from this problem the items not shown when browsing the gallery as a site admin should be removed (backup first!).
The error can also occur if your mySQL is configured to only allow a certain amount of updates each given interval. The actual mySQL-error is 1226: User 'xxx' has exceeded the 'max_updates' resource (current value: xxxxx), but it's this ERROR_STORAGE_FAILURE that is shown in Gallery2. See: I seem to be running into some sort of MySQL query limit
The only thing you can do is to clean up (like it's explained above) and wait untill you can send update to your mySQL-server again.
If the error occur while displaying the gallery, check if you don't have any dead mysql process by stoping mysql and looking with ps -ef. If yes, simply kill the processes with kill -9 and start mysql.