From 9beff2cf640db03f0efcc3f3468ce6d75e3bde3b Mon Sep 17 00:00:00 2001 From: Noah Miller Date: Mon, 29 May 2017 15:33:58 -0700 Subject: [PATCH] Add help text to civicrm.settings.php regarding DSNs containing quotes/backslashes --- templates/CRM/common/civicrm.settings.php.template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template index 9f0f6bbe48..10e2f28de4 100644 --- a/templates/CRM/common/civicrm.settings.php.template +++ b/templates/CRM/common/civicrm.settings.php.template @@ -65,7 +65,9 @@ if (!defined('CIVICRM_UF')) { /** * Content Management System (CMS) Datasource: * - * Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, server and DB name. + * Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, password, server and DB name. + * If any of these contain a single quote or backslash, escape those characters with a backslash: \' and \\, respectively. + * * Datasource (DSN) format: * define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true'); */ @@ -92,6 +94,9 @@ if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') { * CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm * define( 'CIVICRM_DSN' , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true'); * + * If your username, password, server or DB name contain a single quote or backslash, escape those characters + * with a backslash: \' and \\, respectively. + * */ if (!defined('CIVICRM_DSN')) { if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) { -- 2.25.1