Confirming MySQLnd as the Active Driver
While the presence of MySQLnd in phpinfo() indicates its installation, it does not guarantee that it is the active driver. To definitively determine whether MySQLnd is operational, additional measures are necessary.
Checking for MySQLnd in mysqli
To ascertain MySQLnd's status in mysqli, you can utilize the mysqli_fetch_all function. The presence of this function signifies that MySQLnd is enabled:
$mysqlnd = function_exists('mysqli_fetch_all');
if ($mysqlnd) {
echo 'mysqlnd enabled!';
}
Verifying MySQLnd for PDO
To confirm MySQLnd's active status in PDO, follow these steps:
if (strpos($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION), 'mysqlnd') !== false) {
echo 'PDO MySQLnd enabled!';
}
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3