title: PHP 7.0 ODBC-Driver for Windows
body: <p>I upgraded my PHP 5.6.30 (<a href="https://www.apachefriends.org/de/download.html" rel="noreferrer">https://www.apachefriends.org/de/download.html</a>) to PHP 7.0 (<a href="https://bitnami.com/stack/wamp/installer" rel="noreferrer">https://bitnami.com/stack/wamp/installer</a>)</p>
  
  <p>Everything worked fine so far and it reduces the loading time from my Page from 1,2 seconds to ~300 ms, when I use a MySQL-Database. But now I'm trying to connect to a MSSQL-Database with the following simple script, that worked fine with my old installation (PHP 5.6):</p>
  
  <pre><code>&lt;?php
      //Use the machine name and instance if multiple instances are used
      $server = 'Server-Adress';
      $user = '';
      $pass = '';
      //Define Port
      $port='Port=1433';
      $database = 'Databasename';
  
      $connection_string = "DRIVER={SQL Server};SERVER=$server;$port;DATABASE=$database";
      $conn = odbc_connect($connection_string,$user,$pass);
      if ($conn) {
          echo "Connection established.";
      } else{
          die("Connection could not be established.");
      }
  
      $sql = "SELECT * FROM st3_200 WHERE identifier = 1";
  
      $result = odbc_exec($conn,$sql);
      // Get Data From Result
        while ($data[] = odbc_fetch_array($result));
  
        // Free Result
        odbc_free_result($result);
  
        // Close Connection
        odbc_close($conn);
  
        // Show data
        print_r($data);
  
  ?&gt;
  </code></pre>
  
  <p>But now I got an error in my logs that says:</p>
  
  <blockquote>
    <p>[Thu Dec 10 11:55:26.629956 2015] [:error] [pid 260:tid 968] [client
    ::1:63003] PHP Fatal error:  Uncaught Error: Call to undefined
    function odbc_connect() in
    C:\Bitnami\wampstack-7.0.0-0\apache2\htdocs\test\query.php:11\nStack
    trace:\n#0 {main}\n  thrown in
    C:\Bitnami\wampstack-7.0.0-0\apache2\htdocs\test\query.php on
    line 11</p>
  </blockquote>
  
  <p>First I thought, that my php.ini has a missing extension, so I enabled "extension=php_pdo_odbc.dll" </p>
  
  <p>the difference from the php.ini in the 5.6 version is there is the extension:
  "extension=php_mssql.dll" enabled. But I can't find them in the new PHP 7.0.ini</p>
  
  <p>So my intension is there is no existing driver for odbc and PHP 7 yet?
  I found some driver for Linux here:
  <a href="https://aur.archlinux.org/packages/php7-odbc/" rel="noreferrer">https://aur.archlinux.org/packages/php7-odbc/</a></p>
  
  <p>But I need something for my Windows environment.</p>
  
  <p>Does anyone had the same issue and has already fixed it?</p>
  
  <p>Thank und Greeting
  Domi</p>