I recently updated my wampserver 2.0 to wampserver 2.5.
And while i am running the php smarty code i am getting this error.
"Fatal error: Class 'DB' not found in
C:\wamp\www\livehrm.new\product\common.php on line 63"
I think it might be a pear issue of old wampserver.
Please help me
//session_start();
require_once 'DB.php';
$dbHost = $dbconfig['db_hostname'];
$dsn1[0] = array('type'=>'DB', 'dsnstuff'=>"mysql://$dbUser:$dbPassword@localhost/$dbName"); $dbdsn = "mysql://$dbUser:$dbPassword@$dbHost/$dbName";
$db = DB::connect($dbdsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
?>
MySQL extension is deprecated as of PHP 5.5.0, and is not recommended for writing new code as it will be removed in the future. Instead, either the mysqli or PDO_MySQL extension should be used. Ref: http://php.net/manual/en/function.mysql-select-db.php
Update your DB.php with following code
There is not Class found in you provided code of file DB.php. I will update my answer when you send class code of DB