ispCP - Board - Support
Database Update failed with nightly - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Tickets / Roadmap / Timeline (/forum-50.html)
+--- Thread: Database Update failed with nightly (/thread-10554.html)



Database Update failed with nightly - TheCry - 04-27-2010 04:08 PM

Hi...
I merged the nightly to the branch apps-installer...
Now i want to update my installation (branch)... I got an error while database update:

Quote: ispCP database
Update ispCP database schema Failed

FATAL: An error was occured during update process!
Correct it and re-run this program.

In the log i found this error
Quote: more ispcp-update-database.log

Warning: require_once(/var/www/ispcp/gui/include/class.criticalUpdate.php): failed to open stream: No such file or directory in /var/www/ispcp/gui/include/is
pcp-lib.php on line 38

Fatal error: require_once(): Failed opening required '/var/www/ispcp/gui/include/class.criticalUpdate.php' (include_path='/var/www/ispcp/gui/include/htmlpuri
fier:.:/usr/share/php:/usr/share/pear') in /var/www/ispcp/gui/include/ispcp-lib.php on line 38

The message is correct, because yesterday the file "class.criticalUpdate.php" was deleted!

Any solutions?


RE: Database Update failed with nightly - RatS - 04-27-2010 04:25 PM

Could you already fix it? If not check for "criticalUpdate" in your source code. This class name should not be used any more, otherwise ispcp-lib.php tries to include the non-existing file. Regarding your database update I'm not sure, but I will have a look this evening.

Edit:
I think the problem is that your version number has already been 33 and you try to apply the 33-patch in 35 again.


RE: Database Update failed with nightly - TheCry - 04-27-2010 04:32 PM

I found the problem....

In the file /var/www/ispcp/engine/setup/updDB.php is a section where this function is called
Code:
// Perfom all database critical updates if exists
if (criticalUpdate::getInstance()->checkUpdateExists()) {

    criticalUpdate::getInstance()->executeUpdates();

    if ( ($msg = criticalUpdate::getInstance()->getErrorMessage()) != '') {
        print $msg;
        exit(1);
    }

}
After removing this code. Everything works fine. The Updates of your changes, too!

Should i commit the change?
Or do you want to do this on your own?


RE: Database Update failed with nightly - TheCry - 04-28-2010 03:36 PM

Good morning Rats...
Did you fix it?
I think this have to be fixed as quickly as possible.
No update is possible.

Should i fix it today?


RE: Database Update failed with nightly - RatS - 04-28-2010 04:28 PM

You are right, I oversaw this occurence. I fixed it in r2892. thanks for the Report.


RE: Database Update failed with nightly - TheCry - 04-28-2010 04:33 PM

Thanks!