Error During Setup

joshuarosenthal wrote on Wednesday, December 30, 2015:

I’m following the guide located here in order to setup OpenEMR, and I’m unable to make it past the second step. When I input my passwords into the “Password” and “Initial User Password” fields and hit continue, I’m presented with the following error:

Connecting to MySQL Server…
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\openemr\openemr-4.2.0\library\classes\Installer.class.php:457 Stack trace: #0 C:\xampp\htdocs\openemr\openemr-4.2.0\library\classes\Installer.class.php(103): Installer->connect_to_database(‘localhost’, ‘root’, ‘’, ‘3306’) #1 C:\xampp\htdocs\openemr\openemr-4.2.0\setup.php(327): Installer->root_database_connection() #2 {main} thrown in C:\xampp\htdocs\openemr\openemr-4.2.0\library\classes\Installer.class.php on line 457

Now, I don’t actually understand any of it, but if it helps, I opened Installer.class.php in Notepad++ and found this:

private function connect_to_database( $server, $user, $password, $port )
{
if ($server == “localhost”)
[line 457] $dbh = mysql_connect($server, $user, $password);
else
$dbh = mysql_connect(“$server:$port”, $user, $password);
return $dbh;
}

Can anyone help me figure out how to proceed?

fsgl wrote on Wednesday, December 30, 2015:

Is there a reason you cannot install Windows XAMPP Package instead?

If you must install OpenEMR separately, try steps here.