Answers.Body: <p>First, thank you, Demerit, for helping me. I found a patch for the fatal error and it went away. However, the installation error remained. </p>
  
  <p>At the end, turns out this error was due to MySQL password containing special characters. Once the password was changed, I was able to install without any errors. Hope this helps someone else. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T22:10:32.703Z
Answers.LastActivityDate: 2019-02-01T22:10:32.703Z
Answers.UserDisplayName: j007w
Answers.Body: <p>It looks like you're using the "mysql" database connector which was removed in php 7.0. Try "mysqli" instead.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T19:32:11.180Z
Answers.Text: Hi Demerit. Thanks so much for your suggestions. Could you please tell me how to have the install use mysqli instead? Thanks again!
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T19:45:39.857Z
Answers.Text: I followed the instructions in this page (https://civicrm.org/blog/totten/psa-please-verify-php-extension-mysqli) and got the "loaded" response. Is there something I need to do to direct the installer to use mysqli?
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T20:50:41.563Z
Answers.Text: Do you by any chance have an environment variable DB_DSN_MODE set? From what I can see the installer should automatically pick mysqli if it's available (as you've tested), but if you have DB_DSN_MODE set, and it's set to something other than "auto" it might not pick it. Also can you check did it actually create the new civicrm database? Also I assume username and password are something you typed above just to hide the real ones, and you're actually using the real ones on the install screen.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T21:16:08.093Z
Answers.Text: Hi Demerit. I have no idea how to check the environment variable DB_DSN_MODE. I checked the installer page but it's not there. Did a Google search but that didn't help. Is this part of CiviCRM or PHP/MySQL? I manually created the CiviCRM prior to installation attempt, and you're correct that I entered the real username/pw during these attempts. Thanks again.
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T21:42:53.060Z
Answers.Text: I found db_dsn_mode in the function, parseDSN($dsn), in packages/db.php; did not modify any CiviCRM plugin related files at all. Maybe this is what you meant?
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T21:44:26.833Z
Answers.Text: I think I'm wrong about the environment variable anyway.  Can you check if mysqli is actually available to the webserver, using phpinfo like so http://v1.jontangerine.com/silo/php/phpinfo/, and put the file in the civicrm folder.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T22:19:42.330Z
Answers.Text: Hi Demerit. I did that and [here is the php_info output](https://unsee.cc/3c95ee42/). Do you see anything misconfigured? Thanks so much for your help.
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T22:33:19.040Z
Answers.Text: That seems fine. (For security reasons you may want to remove the .php file now.) And I assume your wordpress install is working fine? I'm a little out of ideas. You can try putting in some debugging code in packages/db.php to see what it's doing? Maybe check mysql is actually available on tcp port 3306, but it seems unlikely it wouldn't be?
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T02:09:27.250Z
Answers.Text: Thanks, Demerit. I appreciate you. I was researching more into this and found this Apache error right after pressing the install button: `PHP Fatal error:  Can't use function return value in write context in /wp-content/plugins/civicrm/civicrm.php on line 342`. This is the function that starts on line 342: `if ( empty( session_id() ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
        session_start();
      }`. What'd you think this means? Thanks again!
Answers.UserDisplayName: j007w
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T02:31:24.633Z
Answers.Text: See this question? https://civicrm.stackexchange.com/questions/27723/cant-use-function-return-value-in-write-context-in-civicrm-php-on-line-342
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T18:20:53.463Z
Answers.LastActivityDate: 2019-01-29T18:20:53.463Z
Answers.UserDisplayName: Demerit
Body: <p>I've been trying to install the lastest version, 5.9.1, on a new WordPress 5.0.3 site. Requirement checks all passed but when I clicked "Check Requirements and Install CiviCRM" button I got this error:</p>
  
  <pre><code>Cannot open mysql://username:password@localhost:3306/database_name?new_link=true: DB Error: connect failed
  </code></pre>
  
  <p>Server is using PHP 7.0.27.</p>
  
  <p>Can anyone point me to the right path?</p>
  
  <p>Thanks so much!</p>
  
Tags: <wordpress><mysql>
Title: WordPress installation with MySql connection problem
ThreadText: # WordPress installation with MySql connection problem
  
  (Asked by: username_0 on 2019-01-29)
  
  I've been trying to install the lastest version, 5.9.1, on a new WordPress 5.0.3 site. Requirement checks all passed but when I clicked "Check Requirements and Install CiviCRM" button I got this error:
  Cannot open mysql://username:password@localhost:3306/database_name?new_link=true: DB Error: connect failed
  
  Server is using PHP 7.0.27.
  Can anyone point me to the right path?
  Thanks so much!
  
  **Tags:** wordpress, mysql
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-02-01. Score: 1
  
  First, thank you, username_1, for helping me. I found a patch for the fatal error and it went away. However, the installation error remained.
  
  At the end, turns out this error was due to MySQL password containing special characters. Once the password was changed, I was able to install without any errors. Hope this helps someone else.
  
  
  ---
  
  ### Answer by username_1 on 2019-01-29. Score: 0
  
  It looks like you're using the "mysql" database connector which was removed in php 7.0. Try "mysqli" instead.
  
  > **Comments:**
  > **username_0**: Hi username_1. Thanks so much for your suggestions. Could you please tell me how to have the install use mysqli instead? Thanks again!  
  > **username_0**: I followed the instructions in this page (https://civicrm.org/blog/totten/psa-please-verify-php-extension-mysqli) and got the "loaded" response. Is there something I need to do to direct the installer to use mysqli?  
  > **username_1**: Do you by any chance have an environment variable DB_DSN_MODE set? From what I can see the installer should automatically pick mysqli if it's available (as you've tested), but if you have DB_DSN_MODE set, and it's set to something other than "auto" it might not pick it. Also can you check did it actually create the new civicrm database? Also I assume username and password are something you typed above just to hide the real ones, and you're actually using the real ones on the install screen.  
  > **username_0**: Hi username_1. I have no idea how to check the environment variable DB_DSN_MODE. I checked the installer page but it's not there. Did a Google search but that didn't help. Is this part of CiviCRM or PHP/MySQL? I manually created the CiviCRM prior to installation attempt, and you're correct that I entered the real username/pw during these attempts. Thanks again.  
  > **username_0**: I found db_dsn_mode in the function, parseDSN($dsn), in packages/db.php; did not modify any CiviCRM plugin related files at all. Maybe this is what you meant?  
  > **username_1**: I think I'm wrong about the environment variable anyway.  Can you check if mysqli is actually available to the webserver, using phpinfo like so http://v1.jontangerine.com/silo/php/phpinfo/, and put the file in the civicrm folder.  
  > **username_0**: Hi username_1. I did that and [here is the php_info output](https://unsee.cc/3c95ee42/). Do you see anything misconfigured? Thanks so much for your help.  
  > **username_1**: That seems fine. (For security reasons you may want to remove the .php file now.) And I assume your wordpress install is working fine? I'm a little out of ideas. You can try putting in some debugging code in packages/db.php to see what it's doing? Maybe check mysql is actually available on tcp port 3306, but it seems unlikely it wouldn't be?  
  > **username_0**: Thanks, username_1. I appreciate you. I was researching more into this and found this Apache error right after pressing the install button: `PHP Fatal error:  Can't use function return value in write context in /wp-content/plugins/civicrm/civicrm.php on line 342`. This is the function that starts on line 342: `if ( empty( session_id() ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {       session_start();     }`. What'd you think this means? Thanks again!  
  > **username_1**: See this question? https://civicrm.stackexchange.com/questions/27723/cant-use-function-return-value-in-write-context-in-civicrm-php-on-line-342  
  
  ---
  
  