Answers.Body: <p>This turned out to be the issue with PEAR trying to load DB (mysql) extension. PHP mysql extension is removed from PHP7. </p>
  
  <p>For those who landed here with same errors, when trying to execute commands with <code>civix</code> or <code>drush</code> which uses command-line php (php-cli), if your OS has installed both PHP5 and PHP7, the default <code>php</code> command available in <code>/usr/bin/php</code> refers to PHP7 while PHP5 executable will be available as <code>/usr/bin/php5</code></p>
  
  <p>One needs to update <code>/usr/bin/php</code> to <code>/usr/bin/php7</code> and direct <code>/usr/bin/php5</code> towards <code>/usr/bin/php</code>. Maybe using <code>update-alternatives</code> would be best suited.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-03T15:42:46.470Z
Answers.Text: Thank you, I had this exact issue with civicrm-buildkit earlier this week!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-03T22:02:00.720Z
Answers.LastActivityDate: 2016-09-03T22:02:00.720Z
Answers.UserDisplayName: VanagaS
Answers.Body: <p>I was facing the same error. I solved it by changing <code>mysql:</code> to <code>mysqli:</code> in <code>civicrm.settings.php</code> file. Reference - <a href="https://issues.civicrm.org/jira/browse/CRM-17874" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-17874</a></p>
  <p>Thanks.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-01T06:37:58.260Z
Answers.LastActivityDate: 2020-10-01T06:37:58.260Z
Answers.UserDisplayName: Sohel Pathan
Body: <p>I've got CiviCRM installed within a WordPress context, and both are updated. The problem is that, with the last update that occurred, I can no longer get to CiviCRM. Instead, I get the following displayed on a blank page without any styling:</p>
  
  <pre><code>Initialization Error
  
  Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; simpleHandler
          )
  
      [code] =&gt; -25
      [message] =&gt; DB Error: extension not found
      [mode] =&gt; 16
      [debug_info] =&gt;  [DB Error: extension not found]
      [type] =&gt; DB_Error
      [user_info] =&gt;  [DB Error: extension not found]
      [to_string] =&gt; [db_error: message="DB Error: extension not found" code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [DB Error: extension not found]"]
  )
  </code></pre>
  
  <p>Does anyone have any idea how I can fix this? It says an extension is not found, but there is no mention of what the extension is or why it's missing as the result of an update.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-15T08:10:45.087Z
Comments.Text: It would be helpful if you could provide some more information about the versions of CiviCRM and of WordPress.  Also please state which version you upgraded from.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-17T17:22:25.067Z
Comments.Text: It is WordPress 4.5 and ViviCRM version 4.6. I don't remember the version of CiviCRM that I upgraded from, but it would be the immediately preceding version. I don't monitor the CiviCRM site on a daily basis. I upgrade when WordPress alerts me.
Comments.UserDisplayName: LarryTX
Tags: <wordpress><upgrade><database><error>
Title: CiviCRM Initalization Error: DB Error: extension not found
ThreadText: # CiviCRM Initalization Error: DB Error: extension not found
  
  (Asked by: username_0 on 2016-04-14)
  
  I've got CiviCRM installed within a WordPress context, and both are updated. The problem is that, with the last update that occurred, I can no longer get to CiviCRM. Instead, I get the following displayed on a blank page without any styling:
  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]"]
  )
  
  Does anyone have any idea how I can fix this? It says an extension is not found, but there is no mention of what the extension is or why it's missing as the result of an update.
  
  **Tags:** wordpress, upgrade, database, error
  
  > **Comments:**
  > **username_1**: It would be helpful if you could provide some more information about the versions of CiviCRM and of WordPress.  Also please state which version you upgraded from.  
  > **username_0**: It is WordPress 4.5 and ViviCRM version 4.6. I don't remember the version of CiviCRM that I upgraded from, but it would be the immediately preceding version. I don't monitor the CiviCRM site on a daily basis. I upgrade when WordPress alerts me.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-09-03. Score: 2
  
  This turned out to be the issue with PEAR trying to load DB (mysql) extension. PHP mysql extension is removed from PHP7.
  
  For those who landed here with same errors, when trying to execute commands with `civix` or `drush` which uses command-line php (php-cli), if your OS has installed both PHP5 and PHP7, the default `php` command available in `/usr/bin/php` refers to PHP7 while PHP5 executable will be available as `/usr/bin/php5`
  
  One needs to update `/usr/bin/php` to `/usr/bin/php7` and direct `/usr/bin/php5` towards `/usr/bin/php`. Maybe using `update-alternatives` would be best suited.
  
  > **Comments:**
  > **username_3**: Thank you, I had this exact issue with civicrm-buildkit earlier this week!  
  
  ---
  
  ### Answer by username_4 on 2020-10-01. Score: 1
  
  I was facing the same error. I solved it by changing `mysql:` to `mysqli:` in `civicrm.settings.php` file. Reference - <https://issues.civicrm.org/jira/browse/CRM-17874>
  
  Thanks.
  
  
  ---
  
  