Jump to content


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


Fatal error: DB Error: extension not found

Recommended Posts

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


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


$_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);



Share this post

Link to post
Share on other sites

I assume it works from the browser? The php.ini for the browser may include the extension you need, but not the php.ini for the command line.

Share this post

Link to post
Share on other sites

  • 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.