MySQLND support from CPanel

Go to your Cpanel and scroll down to Select PHP versions , here you can change your PHP version , or change your available plugins for your account.

MySQLi support from CPanel

By default it must be checked for your hosting ( depends on the version of PHP you are using ) , you can enable or disable this by visiting CPanel and then PHP Version link.

These changes can be done for shared hosting also ( without contacting your hosting support )

Enabling MySQLnd

If you are using mysqli ( not Mysql ) then you need to use nd_mysqli . This is required as several functions like mysqli_fetch_all , get_result() etc are not going to work without support of nd_mysqli. Adding mysqlnd support
You need to uncheck mysqli ( remove ) and check nd_mysqli , you can’t make both checked as there will be a conflict. Here is the screenshot to make MySQLnd work. Part of the PHPinfo() showing about mysql
phpinfo showing mysqlnd support

PHP 7

After changing to PHP 7 we found the same problem so inplace of mysqli we checked nd_mysqli .
PHP 7 Adding mysqlnd support

Example: Performance Comparison Between mysqlnd and libmysqlclient

$mysqli = new mysqli("localhost", "user", "password", "database");

// Measure execution time using mysqlnd
$start_time = microtime(true);
// Query execution...
$end_time = microtime(true);
echo "mysqlnd Execution time: " . ($end_time - $start_time) . " seconds.";
Explanation:
  • mysqlnd vs. libmysqlclient: Shows how mysqlnd offers better memory and CPU optimization, allowing faster query execution.
  • Use Case: Useful in applications that demand high performance, especially under heavy load.

MYSQLI Functions mysqli_num_rows() Number of rows in result set SELECT query


Subscribe to our YouTube Channel here



plus2net.com







Tomas Eriksson

05-01-2019

This solved my issue, many many thanks! :)




PHP video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2026   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer