Revert change to dsns as per discussion with Tim, also add in information on new...
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 9 Sep 2016 22:29:12 +0000 (08:29 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 14 Sep 2016 00:53:21 +0000 (10:53 +1000)
install/civicrm.php
templates/CRM/common/civicrm.settings.php.template

index 1d707cadef335e2175ba1a5cf7513f49131e7b7b..c23bf6020b4d364aef7ed6c7f6145dc5a964829a 100644 (file)
@@ -97,7 +97,7 @@ function civicrm_main(&$config) {
     civicrm_setup($files_dirname);
   }
 
-  $dsn = "mysqli://{$config['mysql']['username']}:{$config['mysql']['password']}@{$config['mysql']['server']}/{$config['mysql']['database']}?new_link=true";
+  $dsn = "mysql://{$config['mysql']['username']}:{$config['mysql']['password']}@{$config['mysql']['server']}/{$config['mysql']['database']}?new_link=true";
 
   civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm.mysql');
 
index 3425d90cf4bdf9c9cc8cd6b5876afbb01dbeccdd..44f2d7b60a511082d25fbeed92fe8f00618262ac 100644 (file)
@@ -67,10 +67,10 @@ if (!defined('CIVICRM_UF')) {
  *
  * Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, server and DB name.
  * Datasource (DSN) format:
- *      define( 'CIVICRM_UF_DSN', 'mysqli://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
+ *      define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
  */
 if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
-  define( 'CIVICRM_UF_DSN'           , 'mysqli://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
+  define( 'CIVICRM_UF_DSN'           , 'mysql://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
 }
 
 /**
@@ -78,19 +78,19 @@ if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') {
  *
  * Database URL (CIVICRM_DSN) for CiviCRM Data:
  * Database URL format:
- *      define( 'CIVICRM_DSN', 'mysqli://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
+ *      define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
  *
  * Drupal and CiviCRM can share the same database, or can be installed into separate databases.
  * Backdrop CMS and CiviCRM can also share the same database, or can be installed into separate databases.
  *
  * EXAMPLE: Drupal/Backdrop and CiviCRM running in the same database...
  *      DB Name = cms, DB User = cms
- *      define( 'CIVICRM_DSN'         , 'mysqli://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
+ *      define( 'CIVICRM_DSN'         , 'mysql://cms:YOUR_PASSWORD@localhost/cms?new_link=true');
  *
  * EXAMPLE: Drupal/Backdrop and CiviCRM running in separate databases...
  *      CMS DB Name = cms, DB User = cms
  *      CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
- *      define( 'CIVICRM_DSN'         , 'mysqli://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
+ *      define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true');
  *
  */
 if (!defined('CIVICRM_DSN')) {
@@ -98,10 +98,18 @@ if (!defined('CIVICRM_DSN')) {
     define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']);
   }
   else {
-    define('CIVICRM_DSN', 'mysqli://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true');
+    define('CIVICRM_DSN', 'mysql://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true');
   }
 }
 
+/**
+ * CiviCRM DSN Mode
+ * Used to determine if you want CiviCRM to automatically change the dsn to mysqli if its avaliable.
+ * Uncomment and edit below as necessary
+ */
+// define ('DB_DSN_MODE', 'auto');
+
+
 /**
  * CiviCRM Logging Database
  *