Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlsrv running on php 5.4

Tags:

php

I've just upgraded from PHP 5.3.10 to 5.4, now I get the following when trying to initialise php on the command line in windows:

C:\php5.4>php -v
PHP Warning:  PHP Startup: sqlsrv: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.0 (cli) (built: Feb 29 2012 19:06:50)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

This should be a straight swap. I've downloaded the NTS version of php (same as 5.3.10 version) & referenced the php_sqlsrv_53_nts_vc9.dll (v2) of sqlsrv.

Out of interest I also have the sqlsrv v3.0 extension, which I tried to load in and get the same error.

Has anyone else had this issue, or know of how to fix it?

TIA

D

like image 271
StuffandBlah Avatar asked Mar 20 '12 21:03

StuffandBlah


1 Answers

It looks like the version of the dll you have is for PHP 5.3

I'm not sure if there is a version out for 5.4 yet, but you can check the PHP Extensions for Windows page to see.

The system requirements page from Microsoft appears to indicate not (although it may not have been updated yet).

like image 133
bhamby Avatar answered Oct 07 '22 22:10

bhamby