Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to enable mysqli using Easyapache 4

Default PHP MSQL Extension is deprecated and it will be removed in the future PHP version. Instead of PHP mysql extension, mysqli should be used in the code to avoid PHP compatibility issue.

In EasyApache 3, we can select Mysqli Extension separately during Apache and PHP compilation using EasyApache 3. But in the latest cPanel version, we have to use EasyApache 4 to enable any PHP extension as EasyApache 3 is no longer available in new cPanel installation.

EasyApache 4 is now rpm based system and it is easy to use comparing to EasyApache 3.

If mysqli extension is not enabled on your cPanel and if you go to EasyApahce 4, you will notice that there is no separate selection to enable PHP mysqli extension. The reason is, mysqli extension is now provided by the mysqlnd package. That means if you enable mysqlnd package, it should include mysqli extension as well. Also, you can check using command line:

root@[~]# rpm -ql ea-php55-php-mysqlnd
/opt/cpanel/ea-php55/root/etc/php.d/mysqlnd.ini
/opt/cpanel/ea-php55/root/etc/php.d/mysqlnd_mysql.ini
/opt/cpanel/ea-php55/root/etc/php.d/mysqlnd_mysqli.ini
/opt/cpanel/ea-php55/root/etc/php.d/pdo_mysqlnd.ini
/opt/cpanel/ea-php55/root/usr/lib64/php/modules/mysqlnd.so
/opt/cpanel/ea-php55/root/usr/lib64/php/modules/mysqlnd_mysql.so
/opt/cpanel/ea-php55/root/usr/lib64/php/modules/mysqlnd_mysqli.so
/opt/cpanel/ea-php55/root/usr/lib64/php/modules/pdo_mysqlnd.so

As you can see above, if you enable mysqlnd for PHP 5.5, it will also enable mysqli extension for PHP 5.5. If you still receive any error, you will have to make sure that there is no custom php.ini or .htaccess code which is changing your default PHP settings.



This post first appeared on Web Hosting Blog - Web Hosting Discussion, please read the originial post: here

Share the post

How to enable mysqli using Easyapache 4

×

Subscribe to Web Hosting Blog - Web Hosting Discussion

Get updates delivered right to your inbox!

Thank you for your subscription

×