Zhixian's Tech Blog

2014-08-09

Undefined function sqlsrv_connect()

One of the issues with using Microsoft Drivers 3.0 for PHP is it only works up to PHP version 5.4 while the latest stable version is 5.5.
Attempting to connect to a Sql Server database using the driver on a PHP 5.5 runtime will result in the following message.

image

Some workarounds would be:

  1. Use ODBC instead of Microsoft Drivers 3.0 for PHP.
  2. Downgrade the your PHP runtime from 5.5 to 5.4
  3. Get the source code for Microsoft Drivers 3.0 for PHP and compiled it for PHP 5.5 runtime.
  4. Get one of the re-compiled Microsoft Drivers 3.0 for PHP for PHP 5.5 that are distributed by others in the Internet.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.