1

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

2
  • Is mysqli actually enabled in php (does it appear in the output of php -i)?
    – Demerit
    Aug 15, 2023 at 4:10
  • 1
    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. Aug 15, 2023 at 9:57

1 Answer 1

0

Based on comments the problem was that mysqli was not enabled in php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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