Win 8.1 IIS 8.5 PHP Error - Call to undefined function mysql_connect()

Windows 8.1 IIS 8.5 php 5.4.24 MySQL 5.5. I used the MS Web Platform Installer 5.0 to install php, mysql

I can go to http://localhost and view my phpInfo() page. However, when I try to go to the default login page http://localhost/xyz/default.php, I get this error: “Call to undefined function mysql_connect()”

The line in the code throwing the error looks like this:

$XYZ['db_connect'] = mysql_connect($XYZ['db_host'],$XYZ['db_user'],$XYZ['db_password']);

Any ideas are appreciated.

Have you enabled the old-style mysql access library in PHP settings-> PHP extensions? I’m wondering if that installation defaults to only enabling mysqli or PDO libraries. In any case it’s apparently only a matter of time until mysql is left off hosted installations as support for it is in the process of being removed in favour of mysqli and PDO.

Thanks for the response. I will look into that.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.