Quick help with db.php file

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Shanana
Registered User
Posts: 368
Joined: Sat Aug 28, 2004 4:03 am
Location: USA [from London, England]

Quick help with db.php file

Post by Shanana »

On my main page, it says this:
Fatal error: Cannot instantiate non-existent class: sql_db in /home/tycp/public_html/vip/db/db.php on line 42


This is the current file:
<?php
global $forum_admin;
if ($forum_admin == 1) {
$the_include = "../../../db";
} elseif ($inside_mod == 1) {
$the_include = "../../db";
} else {
$the_include = "db";
}

switch($dbtype) {

case 'mysql4':
include("".$the_include."/mysql4.php");
break;

case 'postgres':
include("".$the_include."/postgres7.php");
break;

case 'mssql':
include("".$the_include."/mssql.php");
break;

case 'oracle':
include("".$the_include."/oracle.php");
break;

case 'msaccess':
include("".$the_include."/msaccess.php");
break;

case 'mssql-odbc':
include("".$the_include."/mssql-odbc.php");
break;

case 'db2':
include("".$the_include."/db2.php");
break;

}
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
die("
<br><br><center><img src=images/logo.gif><br><br><b>There seems to be a problem with the MySQL server, sorry for the inconvenience.<br><br>We should be back shortly.</center></b>
");
}
?>
Thunderbird8
Registered User
Posts: 90
Joined: Tue Feb 24, 2004 5:20 am

Post by Thunderbird8 »

Sounds like the db type is set to something that phpBB doesn't recognize. Check to see if the value in config.php matches any of the values in the switch commands for db.php.
Locked

Return to “2.0.x Support Forum”