Database connection error after updating to PHP7

kanbam

Member
Aug 16, 2013
11
0
1
cPanel Access Level
Root Administrator
cPanelJacob announced (PHP7 support) PHP7 was available to install with easyapache 4.

I installed the base packages, enabled the option in the easyapache 4 provision profile and rebuit. Then in "MultiPHP Manager" select the domain to use PHP7.

The webpage gives this error when using PHP7:
"Database connection error (1): The MySQL adapter 'mysql' is not available.Database connection error (1): The MySQL adapter 'mysql' is not available."

The webpage works correctly in PHP 5.6.

I think I am missing some configuration setting in the PHP7 php.ini
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Hi,

Check out that blog post a little bit towards the bottom, specifically the deprecation section. PHP 7 no longer supports the MySQL extension, and by your error, your script will not work on PHP 7 because it's using a removed extension. You'll either need to upgrade your script, wait for the developers to support PHP 7, or this script might be stuck with using PHP 5.
 

syslint

Well-Known Member
Verifed Vendor
Oct 9, 2006
271
7
168
India
cPanel Access Level
Root Administrator
Twitter
Hi,

Check out that blog post a little bit towards the bottom, specifically the deprecation section. PHP 7 no longer supports the MySQL extension, and by your error, your script will not work on PHP 7 because it's using a removed extension. You'll either need to upgrade your script, wait for the developers to support PHP 7, or this script might be stuck with using PHP 5.
yes , you should use "mysqli" instead of mysql