I'm using s9y (1.2.1) with a local MySQL DB and the MySQLi driver subsystem of s9y. Someday I stopped the DB and didn't start a again.
So s9y said:
I was a bit annoyed of the message and searched the mysqli.inc.php file and found the that the serendipity_db_connect() method assumes a always successful connect.Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host 'localhost' (1) in /private-backup/home/dennis/public_html/blog/include/db/mysqli.inc.php on line 239
Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /private-backup/home/dennis/public_html/blog/include/db/mysqli.inc.php on line 241
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /private-backup/home/dennis/public_html/blog/include/db/mysqli.inc.php on line 250
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /private-backup/home/dennis/public_html/blog/include/db/mysqli.inc.php on line 250
Now, s9y does check if the db_select is successful. If not I use the serendipity_db_probe.
The diff of mysqli.inc.php:
Also I set the error_reporting(0);241c241
< mysqli_select_db($serendipity['dbConn'], $serendipity['dbName']) or serendipity_db_probe($serendipity, &$error);
---
> mysqli_select_db($serendipity['dbConn'], $serendipity['dbName']);
242a243
>
So s9y now says:
I hope it's correct position for the check, but it work...serendipity error: unable to connect to database - exiting.
I really don't know if the check is done by the other DB drivers... So someone could have at it.
Good night!