Answers.Body: <p>Based on comments the problem was that mysqli was not enabled in php.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-15T11:50:23.993Z
Answers.LastActivityDate: 2023-08-15T11:50:23.993Z
Answers.UserDisplayName: Demerit
Body: <p>I'm running CiviCRM 5.63.1 on a Joomla 4 environment and using PHP 8.0.28.</p>
  <p>cli.php keeps failing with these errors:</p>
  <p>[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=&quot;DB Error: extension not found&quot; code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix=&quot;&quot; info=&quot; [DB Error: extension not found]&quot;]</p>
  <p>Looking at the logs I can see where the error gets thrown and it seems to be in PEAR.php</p>
  <p></p><p></p>Aug 14 17:10:43  [debug] $backTrace = #0 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(249): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)
  #1 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(945): CRM_Core_Error::simpleHandler(Object(DB_Error))
  #2 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/db/DB.php(997): PEAR_Error-&gt;__construct(&quot;DB Error: extension not found&quot;, -25, 16, (Array:2), &quot; [DB Error: extension not found]&quot;)
  #3 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&gt;__construct(-25, 16, (Array:2), &quot; [DB Error: extension not found]&quot;)
  #4 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR::_raiseError(Object(DB_mysql), NULL, -25, 16, (Array:2), &quot; [DB Error: extension not found]&quot;, &quot;DB_Error&quot;, TRUE)
  #5 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/db/DB/common.php(1928): PEAR-&gt;__call(&quot;raiseError&quot;, (Array:7))
  #6 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/db/DB/mysql.php(202): DB_common-&gt;raiseError(-25)
  #7 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com_civicrm/civicrm/vendor/pear/db/DB.php(571): DB_mysql-&gt;connect((Array:10), FALSE)</p>
  <p>Any clues?</p>
  <p>I found an old post where it was suggested that changing the connect string to mysqli fixed it, tried that but it didn't.</p>
  <p>Is this an incompatibility between PHP 8 and Pear? Are there any other connection methods I can try.</p>
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-15T04:10:18.383Z
Comments.Text: Is mysqli actually enabled in php (does it appear in the output of `php -i`)?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-15T09:57:54.937Z
Comments.Text: That was a really interesting question and the answer was no! I added mysql to my PHP environment and that seems to have fixed the issue for me.
Comments.UserDisplayName: Paul Butler
Tags: <joomla><php>
Title: DB Error: extension not found
ThreadText: # DB Error: extension not found
  
  (Asked by: username_0 on 2023-08-14)
  
  I'm running CiviCRM 5.63.1 on a Joomla 4 environment and using PHP 8.0.28.
  
  cli.php keeps failing with these errors:
  
  [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]"]
  
  Looking at the logs I can see where the error gets thrown and it seems to be in PEAR.php
  
  Aug 14 17:10:43 [debug] $backTrace = #0 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(249): CRM\_Core\_Error::backtrace("backTrace", TRUE)
  #1 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(945): CRM\_Core\_Error::simpleHandler(Object(DB\_Error))
  #2 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/db/DB.php(997): PEAR\_Error->\_\_construct("DB Error: extension not found", -25, 16, (Array:2), " [DB Error: extension not found]")
  #3 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB\_Error->\_\_construct(-25, 16, (Array:2), " [DB Error: extension not found]")
  #4 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR::\_raiseError(Object(DB\_mysql), NULL, -25, 16, (Array:2), " [DB Error: extension not found]", "DB\_Error", TRUE)
  #5 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/db/DB/common.php(1928): PEAR->\_\_call("raiseError", (Array:7))
  #6 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/db/DB/mysql.php(202): DB\_common->raiseError(-25)
  #7 /var/www/vhosts/xxxx.org/httpdocs/administrator/components/com\_civicrm/civicrm/vendor/pear/db/DB.php(571): DB\_mysql->connect((Array:10), FALSE)
  
  Any clues?
  
  I found an old post where it was suggested that changing the connect string to mysqli fixed it, tried that but it didn't.
  
  Is this an incompatibility between PHP 8 and Pear? Are there any other connection methods I can try.
  
  Thanks
  
  **Tags:** joomla, php
  
  > **Comments:**
  > **username_1**: Is mysqli actually enabled in php (does it appear in the output of `php -i`)?  
  > **username_0**: That was a really interesting question and the answer was no! I added mysql to my PHP environment and that seems to have fixed the issue for me.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-15. Score: 0
  
  Based on comments the problem was that mysqli was not enabled in php.
  
  
  ---
  
  