How to enable mysqli using Easyapache 4

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.

Enable mysqli using EasyApache 4

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

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.

Leave a Reply