Index: dotclear-2.0-beta7/inc/clearbricks/dblayer/class.mysql.php
===================================================================
--- dotclear-2.0-beta7.orig/inc/clearbricks/dblayer/class.mysql.php	2007-08-19 02:35:44.000000000 +0200
+++ dotclear-2.0-beta7/inc/clearbricks/dblayer/class.mysql.php	2007-08-19 02:40:59.000000000 +0200
@@ -32,6 +32,11 @@
 	
 	public function db_connect($host,$user,$password,$database)
 	{
+		/* Loads the mysql extensions if it is not loaded yet */
+		if (!function_exists('mysql_connect')) {
+			@dl('mysql.so');
+		}
+
 		if (!function_exists('mysql_connect')) {
 			throw new Exception('PHP MySQL functions are not available');
 		}
@@ -47,6 +52,11 @@
 	
 	public function db_pconnect($host,$user,$password,$database)
 	{
+		/* Loads the mysql extensions if it is not loaded yet */
+		if (!function_exists('mysql_pconnect')) {
+			@dl('mysql.so');
+		}
+
 		if (!function_exists('mysql_pconnect')) {
 			throw new Exception('PHP MySQL functions are not available');
 		}
@@ -206,4 +216,4 @@
 		return '`'.$str.'`';
 	}
 }
-?>
\ No newline at end of file
+?>
Index: dotclear-2.0-beta7/inc/clearbricks/dblayer/class.pgsql.php
===================================================================
--- dotclear-2.0-beta7.orig/inc/clearbricks/dblayer/class.pgsql.php	2007-08-19 02:35:45.000000000 +0200
+++ dotclear-2.0-beta7/inc/clearbricks/dblayer/class.pgsql.php	2007-08-19 02:41:41.000000000 +0200
@@ -65,6 +65,11 @@
 	
 	public function db_connect($host,$user,$password,$database)
 	{
+		/* Loads the pgsql extensions if it is not loaded yet */
+		if (!function_exists('pg_connect')) {
+			@dl('pgsql.so');
+		}
+
 		if (!function_exists('pg_connect')) {
 			throw new Exception('PHP PostgreSQL functions are not available');
 		}
@@ -80,6 +85,11 @@
 	
 	public function db_pconnect($host,$user,$password,$database)
 	{
+		/* Loads the pgsql extensions if it is not loaded yet */
+		if (!function_exists('pg_pconnect')) {
+			@dl('pgsql.so');
+		}
+
 		if (!function_exists('pg_pconnect')) {
 			throw new Exception('PHP PostgreSQL functions are not available');
 		}
@@ -251,4 +261,4 @@
 		return $this->select($req);
 	}
 }
-?>
\ No newline at end of file
+?>
Index: dotclear-2.0-beta7/inc/clearbricks/dblayer/class.sqlite.php
===================================================================
--- dotclear-2.0-beta7.orig/inc/clearbricks/dblayer/class.sqlite.php	2007-08-19 02:35:45.000000000 +0200
+++ dotclear-2.0-beta7/inc/clearbricks/dblayer/class.sqlite.php	2007-08-19 02:41:15.000000000 +0200
@@ -32,6 +32,11 @@
 	
 	public function db_connect($host,$user,$password,$database)
 	{
+		/* Loads the sqlite extensions if it is not loaded yet */
+		if (!function_exists('sqlite_open')) {
+			@dl('sqlite.so');
+		}
+
 		if (!function_exists('sqlite_open')) {
 			throw new Exception('PHP SQLite functions are not available');
 		}
@@ -47,6 +52,11 @@
 	
 	public function db_pconnect($host,$user,$password,$database)
 	{
+		/* Loads the sqlite extensions if it is not loaded yet */
+		if (!function_exists('sqlite_popen')) {
+			@dl('sqlite.so');
+		}
+
 		if (!function_exists('sqlite_popen')) {
 			throw new Exception('PHP SQLite functions are not available');
 		}
@@ -193,4 +203,4 @@
 		return date('Y-m-d H:i:s');
 	}
 }
-?>
\ No newline at end of file
+?>
