Ticket #30 (closed Bug: fixed)
upgrade.php should check database connection
| Reported by: | slam | Owned by: | markwest |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0.1 |
| Component: | Version: | 1.0.0 | |
| Keywords: | upgrade | Cc: |
Description
In upgrade.php we should have check for database connection similar to the one we do in /install/functions.php:
// we should be connected to the db at this stage
$dbconn = pnDBGetConn(true);
if (!$dbconn) {
$action = 'dbinformation';
$smarty->assign('dbconnectfailed', true);
$smarty->assign(array('dbhost' => $dbhost, 'dbtype' => $dbtype, 'dbname' => $dbname, 'dbusername' => $dbusername,
'dbpassword' => $dbpassword, 'dbtableprefix' => $dbprefix));
}
break;
This will avoid not easy to debug errors like this one:
Allowed memory size of 268435456 bytes exhausted (tried to allocate 21 bytes) in /media/disk1part15/www/includes/pnobjlib/debug.php on line 51
which is in this case not just misleading, but absurd in itself.
Greetings,
Chris
Change History
Note: See
TracTickets for help on using
tickets.
