Jump to content

Fatal error: DB Error: extension not found


chintansshah

Recommended Posts

when I php file from command prompt, I get error"Fatal error: DB Error: extension not found", find code here.

require_once(BASEDIR."/cfg/config.inc");	

set_include_path(BASEDIR."/lib:" .BASEDIR."/lib/class:" . get_include_path());

require_once(BASEDIR."/lib/class/DB.php");
require_once(BASEDIR."/lib/class/DB/Query.php");

$_DB = DB::connect("mysql://" . $_CONFIG['DB']['username'] . (!empty($_CONFIG['DB']['password']) ? ":" . $_CONFIG['DB']['password'] : "")
					. "@" . (!empty($_CONFIG['DB']['server']) ? $_CONFIG['DB']['server'] : "localhost") . "/" . $_CONFIG['DB']['database']
					, array('debug' => 2, 'portability' => DB_PORTABILITY_ALL));


if (PEAR::isError($_DB)) trigger_error($_DB->getMessage(), E_USER_ERROR);
	DB_Query::setDefaultConnection($_DB);

 

 

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.