title: mssql_connect() with PHP5 and MSSQL2012 Express
body: <p>I'm having heavy issues trying to connect to my MSSQL 2012 Express database, with PHP5 running on an Apache.
  I have as a test setup just installed a XAMPP with PHP 5.4.4 and Apache running on a Windows 7 machine.</p>
  
  <p>My PHP code (phpmssql_genxml.php):</p>
  
  <pre><code>$connection = mssql_connect('192.168.40.150', $username, $password);
  if (!$connection) {  die('Not connected : ' . mssql_get_last_message());} 
  
  
  $db_selected = mssql_select_db($database, $connection);
  if (!$db_selected) {
    die ('Can\'t use db : ' . mssql_get_last_message());
  } 
  
  
  $query = "SELECT * FROM Cust WHERE 1";
  $result = mssql_query($query);
  if (!$result) {  
    die('Invalid query: ' . mssql_get_last_message());
  } 
  </code></pre>
  
  <p>Output when trying to enter the site:</p>
  
  <pre><code>Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\phpmssql_genxml.php on line 13
  </code></pre>
  
  <p>Even if I try to hardcode the username and password into the string, I still get the same result.
  Have search a lot on google, but havn't found that post that fixed my issue yet :/
  Have enable TCP/IP for the DB instance pipe, even try'd to assign a specific TCP port for it. Have created a rule in the Win7 firewall allowing all traffic to the standard port 1433. Still no luck.</p>
  
  <p>any1 have an idea?? What does the 'Fatal error' part means? Is it the Apache error, PHP or a Database error when trying to connect to it??</p>