2

CiviCRM 5.9.1 WordPress 5.0.3 PHP 7.2

Upgraded after migration between servers from 4.7.29 w/o issue. When I went inside the CiviCRM it asked me to redo everything like a new install. I went to the MySQL tables and all of my data is there; however, it is not "read" by the CiviCRM. I even added the :3306 to localhost in the civicrm.settings.php and am simply stumped. I have verified that the database info in the DSN section is identical to the database itself. I am running on Business Cloud so I have access to cPanel, phpMyadmin, and terminal. There are NO entries in the error log file. Server runs LightSpeed; however, I have added comments addressing it for WordFence.

The two images show that there are Contacts in the DB (along with everything else) and that the CiviCRM instance does not find anything other than what I filled out. I have also taken a screenshot of the civicrm.settings.php to show that it is set to access my database and one of the database settings itself.

ANY help is GREATLY appreciated as I have tried for over a week to set up an account with Mattermost and it still will not send me an email link.

Image of DatabaseContactsCiviCRM Settings ExampleDB Info

5

Your DB connection specifies mysql://, and you are using PHP7.2. The MySQL extension was deprecated in PHP 5.5 and removed in PHP 7.0.

Try switching the two DB connect strings in civicrm.settings.php to use mysqli:// instead of mysql:// and see if that resolves the issue.

I would also remove any other changes (eg the addition of port :3306), to eliminate issues caused by other attempts to fix things.

If this resolves it, the cause was the migration from a PHP5 server to a PHP7 server, not an upgrade to CiviCRM 5.9.1.

  • Thank you! I will try that when I get back in an hour or so! Would make some sense as I was using the old civicrm.settings.php file as I had to bring it up from 4.7.29 to 5.9.1 in a series of upgrades. The machine would probably not know to modify the settings. Thanks again and I will let you know! – D. Paul Williams Jan 19 at 3:51
1

Since you have access to a terminal, Do you have the wp-cli tool? If so, can you login, go to the civicrm directory (really anywhere under the webroot) and run wp cv sql-conf see if the output matches what you are looking at. Then run wp cv sql-cli and see if it logs you in to the correct database?

I would also search to see if there are any other civicrm.settings.php files. It could be you have more than one and that is the issue

  • Thank you for the QUICK reply! Give me a minute and I will report back. – D. Paul Williams Jan 18 at 23:14
  • Give me a few minutes. When I went in via the Terminal in the cPanel it gave me a bash error. No idea what/why as they do have WP-CLI. I am downloading Putty now. – D. Paul Williams Jan 18 at 23:43
  • So, on the first round I had to nix the "wp" prefix with wp-cli and everything looked Kosher except it is saying mysqli and my DSN info is mysql. There is no info on the socket. It is the WRONG database. On the next entry it opened me into MariaDB. It logs me into the proper nomenclature; however, I vaguely recall that on my old provider we did not have MariaDB. And it is NOT the right database. – D. Paul Williams Jan 19 at 0:37
  • I may have found the issue. While the civicrm.settings.php was correct, the wp-config.php file was pointing wrong. My guess is that WP takes priority and sets the stage for what database will be in control. And I may be wrong. I will know in about an hour. – D. Paul Williams Jan 19 at 1:04
  • So, is there a way to use WP-CLI to simply assign the proper database? Thanks! – D. Paul Williams Jan 19 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.