I want to get info about mysql support with PHP. I need a code to detect if server have mysql support.
if (extension_loaded('mysqlnd')) // or 'mysql' or 'pdo_*'
echo 'MYSQL extension is loaded';
you can also use:
if (function_exists('mysql_connect'))
echo 'MYSQL functions are available';
Save this as info.php
(name not important though) and access it through a web browser. Amongst a bunch of other info, it will tell you whether PHP was compiled with MySQL or not.
<?php
phpinfo();
?>
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With