Answers.Body: <p>Summarising the above conversation:</p>
  
  <ul>
  <li>The upgrade of PHP to version made the PEAR DB extension unavailable. So the exception <em>"DB Error: extension not found"</em> was thrown.</li>
  <li>Changing to the database connection URL in the <code>civicrm.settings.php</code> using the prefix mysql<strong>i</strong> solves the problem.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T14:52:50.073Z
Answers.Text: Worked for me. Thanks
Answers.UserDisplayName: Hassan Farooq
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-01T06:39:29.113Z
Answers.Text: It worked for me too. I solved it by changing "mysql:" to "mysqli:' in civicrm.settings.php file. Reference - https://issues.civicrm.org/jira/browse/CRM-17874
Answers.UserDisplayName: Sohel Pathan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-09T15:48:38.220Z
Answers.LastActivityDate: 2017-02-09T15:48:38.220Z
Answers.UserDisplayName: Kainuk - CiviCooP
Body: <p>Civi: 4.7.11<br>
  Wordpress 4.7.2</p>
  
  <p>Hi, 
  I was working on my database today and munged something up. No problem (I thought)... I did a back up beforehand just in case. Unfortunately, after restoring the database I now get the following when I try to access Civi from the front or back end. WordPress is running fine. <em>(Note: The database restore was a red herring. It was a change of the PHP version at the same time that caused the problem)</em></p>
  
  <p>Civi was working perfectly so I'm rather baffled as to what the issue would be since it's all the same data as before. </p>
  
  <p>Any suggestions would be appreciated.</p>
  
  <pre>
  Initialization Error
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )
  
      [code] => -25
      [message] => DB Error: extension not found
      [mode] => 16
      [debug_info] =>  [DB Error: extension not found]
      [type] => DB_Error
      [user_info] =>  [DB Error: extension not found]
      [to_string] => [db_error: message="DB Error: extension not found" code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [DB Error: extension not found]"]
  )</pre>
  
  <hr>
  
  <p><strong>ADD. 1</strong></p>
  
  <p>I've found two mentions of the same error <br>
  - <a href="https://civicrm.stackexchange.com/questions/11189/civicrm-initalization-error-db-error-extension-not-found">CiviCRM Initalization Error: DB Error: extension not found</a><br>
  - <a href="https://issues.civicrm.org/jira/browse/CRM-17874" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-17874</a></p>
  
  <p>Both refer to the problem being the use of the MySQL extension. I'm a little out of my depth at this point. As far as I can tell there were no changes to the server in the short time between when I made and restored the backup DB. </p>
  
  <hr>
  
  <p><strong>ADD. 2</strong></p>
  
  <p>As mentioned in my reply to Kainuk below, it turns out the host upgraded the PHP from 5.4 to 7. I don't have shell access, or access to the folders mentioned in the links in my previous addendum, so I'll  have to get the host to look at it. Will report back with the results of that. <em>(Turns out I didn't need to go to the host. I was mistaken about where to implement the changes)</em></p>
  
  <hr>
  
  <p><strong>ADD. 3</strong></p>
  
  <p>The host CPanel dashboard is still showing the old PHP version. I only discovered the PHP version was changed to 7 by running a phpinfo query.</p>
  
  <p>The problem was resolved by implementing these changes
  <a href="https://issues.civicrm.org/jira/browse/CRM-17874" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-17874</a> in 
  /wp-content/uploads/civicrm/civicrm.settings.php</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-09T11:29:47.247Z
Comments.Text: The two links you give are not referring to a MySQL extension, but to a PHP extension (namely PEAR). The first gives a hint to force the use of PHP 5 (that PEAR extension). The other proposes to change the PHP driver by changing the MySQL connect string to "mysqli://" (remark the i). Did you try this?
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-09T13:52:13.810Z
Comments.Text: No, I didn't. The server was running PHP 5.4 when I did the install so I was assuming it wouldn't be necessary to force the use of PHP 5. 
  
  I seem to be a victim of Murphy's Law. I went to double check the PHP version and, sure enough, the host upgraded the PHP to 7.0 after I ran my backup. (sigh)
Comments.UserDisplayName: Pennopoly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-09T14:55:46.910Z
Comments.Text: The file where you can change the driver is the civicrm.settings.php file. Are you able to edit this file?
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-09T15:29:54.230Z
Comments.Text: Yes! That did the trick. Thank you so much! 
  (The link above mentioned changing settings in /usr/bin/php. That folder I didn't have access to.)
Comments.UserDisplayName: Pennopoly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-09T15:49:26.333Z
Comments.Text: Nice, I wrapped everything up in an answer. But you did the research!
Comments.UserDisplayName: Kainuk - CiviCooP
Tags: <wordpress><error><database><php>
Title: SOLVED: 'DB Error: extension not found' after PHP upgrade to version 7.0
ThreadText: # SOLVED: 'DB Error: extension not found' after PHP upgrade to version 7.0
  
  (Asked by: username_0 on 2017-02-09)
  
  Civi: 4.7.11
  Wordpress 4.7.2
  Hi, 
  I was working on my database today and munged something up. No problem (I thought)... I did a back up beforehand just in case. Unfortunately, after restoring the database I now get the following when I try to access Civi from the front or back end. WordPress is running fine. (Note: The database restore was a red herring. It was a change of the PHP version at the same time that caused the problem)
  Civi was working perfectly so I'm rather baffled as to what the issue would be since it's all the same data as before. 
  Any suggestions would be appreciated.
  
  Initialization Error
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )
  
      [code] => -25
      [message] => DB Error: extension not found
      [mode] => 16
      [debug_info] =>  [DB Error: extension not found]
      [type] => DB_Error
      [user_info] =>  [DB Error: extension not found]
      [to_string] => [db_error: message="DB Error: extension not found" code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [DB Error: extension not found]"]
  )
  
  ADD. 1
  I've found two mentions of the same error 
  - CiviCRM Initalization Error: DB Error: extension not found
  - https://issues.civicrm.org/jira/browse/CRM-17874
  Both refer to the problem being the use of the MySQL extension. I'm a little out of my depth at this point. As far as I can tell there were no changes to the server in the short time between when I made and restored the backup DB. 
  
  ADD. 2
  As mentioned in my reply to Kainuk below, it turns out the host upgraded the PHP from 5.4 to 7. I don't have shell access, or access to the folders mentioned in the links in my previous addendum, so I'll  have to get the host to look at it. Will report back with the results of that. (Turns out I didn't need to go to the host. I was mistaken about where to implement the changes)
  
  ADD. 3
  The host CPanel dashboard is still showing the old PHP version. I only discovered the PHP version was changed to 7 by running a phpinfo query.
  The problem was resolved by implementing these changes
  https://issues.civicrm.org/jira/browse/CRM-17874 in 
  /wp-content/uploads/civicrm/civicrm.settings.php
  
  **Tags:** wordpress, error, database, php
  
  > **Comments:**
  > **username_1**: The two links you give are not referring to a MySQL extension, but to a PHP extension (namely PEAR). The first gives a hint to force the use of PHP 5 (that PEAR extension). The other proposes to change the PHP driver by changing the MySQL connect string to "mysqli://" (remark the i). Did you try this?  
  > **username_0**: No, I didn't. The server was running PHP 5.4 when I did the install so I was assuming it wouldn't be necessary to force the use of PHP 5.   I seem to be a victim of Murphy's Law. I went to double check the PHP version and, sure enough, the host upgraded the PHP to 7.0 after I ran my backup. (sigh)  
  > **username_1**: The file where you can change the driver is the civicrm.settings.php file. Are you able to edit this file?  
  > **username_0**: Yes! That did the trick. Thank you so much!  (The link above mentioned changing settings in /usr/bin/php. That folder I didn't have access to.)  
  > **username_1**: Nice, I wrapped everything up in an answer. But you did the research!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-09. Score: 9 | Accepted answer
  
  Summarising the above conversation:
  
  * The upgrade of PHP to version made the PEAR DB extension unavailable. So the exception *"DB Error: extension not found"* was thrown.
  * Changing to the database connection URL in the `civicrm.settings.php` using the prefix mysql**i** solves the problem.
  
  > **Comments:**
  > **username_2**: Worked for me. Thanks  
  > **username_3**: It worked for me too. I solved it by changing "mysql:" to "mysqli:' in civicrm.settings.php file. Reference - https://issues.civicrm.org/jira/browse/CRM-17874  
  
  ---
  
  