Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15652
Modified Files:
serendipity_db_mysqli.inc.php serendipity_db_mysql.inc.php
serendipity_db_postgres.inc.php
Log Message:
fail when extensions don't exist
Index: serendipity_db_mysqli.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_mysqli.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- serendipity_db_mysqli.inc.php 5 Jul 2004 08:25:49 -0000 1.2
+++ serendipity_db_mysqli.inc.php 5 Aug 2004 12:30:58 -0000 1.3
@@ -111,6 +111,11 @@
function serendipity_db_probe($hash, &$errs) {
global $serendipity;
+ if (!function_exists('mysqli_connect')) {
+ $errs[] = 'No mysqli extension found. Please check your webserver installation.';
+ return false;
+ }
+
if (!($c = @mysqli_connect($hash['dbHost'], $hash['dbUser'], $hash['dbPass']))) {
$errs[] = 'Could not connect to database; check your settings.';
$errs[] = 'The mySQL error was: ' . mysqli_connect_error();
Index: serendipity_db_mysql.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_mysql.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- serendipity_db_mysql.inc.php 5 Jul 2004 08:25:49 -0000 1.20
+++ serendipity_db_mysql.inc.php 5 Aug 2004 12:30:58 -0000 1.21
@@ -111,6 +111,11 @@
function serendipity_db_probe($hash, &$errs) {
global $serendipity;
+ if (!function_exists('mysql_connect')) {
+ $errs[] = 'No mysql extension found. Please check your webserver installation.';
+ return false;
+ }
+
if (!($c = @mysql_connect($hash['dbHost'], $hash['dbUser'], $hash['dbPass']))) {
$errs[] = 'Could not connect to database; check your settings.';
$errs[] = 'The mySQL error was: ' . mysql_error();
Index: serendipity_db_postgres.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_db_postgres.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- serendipity_db_postgres.inc.php 15 Jul 2004 03:21:24 -0000 1.15
+++ serendipity_db_postgres.inc.php 5 Aug 2004 12:30:58 -0000 1.16
@@ -112,6 +112,11 @@
function serendipity_db_probe($hash, &$errs) {
global $serendipity;
+ if (!function_exists('pg_connect')) {
+ $errs[] = 'No PostgreSQL extension found. Please check your webserver installation.';
+ return false;
+ }
+
$serendipity['dbConn'] = pg_connect(
sprintf(
'%sdbname=%s user=%s password=%s',
|