mysql_connect or mysqli_connect
We just migrated to a brand new cPanel server and one of my PHP pages that used to update our sales orders database stopped working. The database displays fine but it won't let me update any of the fields like it use to.
PHP Version: 5.4.30
MSQL Version: 5.5.37-cll
My first thought was since $db = mysql_connect has been deprecated, it might be time to update the PHP code. But when I tried a simple mysqli_connect to the same database I get "Fatal error: Call to undefined function mysqli_connect() in /home/ptmicom/public_html/admtools/connect.php on line 2".
Searched the web and it looks like I need to enable extension=php_mysql.dll but it is not in my php.inn file. How do I enable support for mysqli_connect?
Thanks,
Brad
-
Hello, You can run EasyApache and then select the required module, in your case mysqli_connect from the Exhaustive Options List. You can run EA from WHM as WHM: Main >> Software >> EasyApache (Apache Update) or via ssh as /scripts/easyapache 0 -
Hello :) You will find "MySQLi" under the "Exhaustive Options List" for PHP in EasyApache. Ensure you build Apache/PHP via EasyApache after selecting the module. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments