cvs: pearweb /include pear-config.php
| From: | Greg Beaver | Date: | Mon, 18 Sep 2006 15:33:41 +0000 |
| Subject: | cvs: pearweb /include pear-config.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4942@lists.php.net to get a copy of this message | ||
cellog Mon Sep 18 15:33:41 2006 UTC
Modified files:
/pearweb/include pear-config.php
Log:
use mysql driver by default, but if it isn't available, fall back to mysqli if it is enabled
http://cvs.php.net/viewvc.cgi/pearweb/include/pear-config.php?r1=1.38&r2=1.39&diff_format=u
Index: pearweb/include/pear-config.php
diff -u pearweb/include/pear-config.php:1.38 pearweb/include/pear-config.php:1.39
--- pearweb/include/pear-config.php:1.38 Thu Aug 17 13:09:27 2006
+++ pearweb/include/pear-config.php Mon Sep 18 15:33:41 2006
@@ -14,7 +14,7 @@
* @category pearweb
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: pear-config.php,v 1.38 2006/08/17 13:09:27 wez Exp $
+ * @version $Id: pear-config.php,v 1.39 2006/09/18 15:33:41 cellog Exp $
*/
if (isset($_ENV['PEAR_CHANNELNAME'])) {
@@ -117,13 +117,18 @@
*/
define('PEAR_DATABASE_DSN', $_ENV['PEAR_DATABASE_DSN']);
} else {
- /**
- * The PEAR::DB DSN connection string
- *
- * To override default, set the value in $_ENV['PEAR_DATABASE_DSN']
- * before this file is included.
- */
- define('PEAR_DATABASE_DSN', 'mysql://pear:pear@localhost/pear');
+ if (function_exists('mysql_connect')) {
+ /**
+ * The PEAR::DB DSN connection string
+ *
+ * To override default, set the value in $_ENV['PEAR_DATABASE_DSN']
+ * before this file is included.
+ */
+ define('PEAR_DATABASE_DSN', 'mysql://pear:pear@localhost/pear');
+ } elseif (function_exists('mysqli_connect')) {
+ /** @ignore */
+ define('PEAR_DATABASE_DSN', 'mysqli://pear:pear@localhost/pear');
+ }
}
if (isset($_ENV['PEAR_AUTH_REALM'])) {