1

Recently I formatted my laptop and installed a fresh copy of Windows 7 Home Basic 64bit, EasyPHP 12.1 (upgraded PHP to version 5.4.6), Microsoft SQL Server 2012 and the SQL Native Client Interface 64bit version as specified in the requirements on Microsoft's website. I have downloaded the Microsoft SQL drivers for PHP (a file SQLSRV30.exe) and copied files php_pdo_sqlsrv_54_ts.dll and php_sqlsrv_54_ts.dll to ext folder.

http://postimage.org/image/mv4dcc3aj/

Also added entries to php.ini

http://postimage.org/image/ruwxxeknj/

I am using the thread safe version according to the snapshot file of EasyPHP, it says Build: C:\php-sdk\php54dev\vc9\x86\obj\Release_TS

Well phpinfo() does not show any support for Microsoft SQL Server! I have done this before and I know that it works. Can anyone help me out here, am I missing something from php.ini or somewhere else?

Thanks

LittleFighter
  • 163
  • 1
  • 3
  • 13
  • Just to add something, I took the installation instructions from this thread: http://stackoverflow.com/questions/5425322/connection-between-mssql-and-php-5-3-5-on-iis-is-not-working and it has worked before! – LittleFighter Jan 31 '13 at 17:53

1 Answers1

3

Eventually I found the problem! I was modifying the wrong php.ini file!

A search for php.ini in C:\Program files(86)\EasyPHP-12.1 revealed 4 files! I decided to change the value of html_errors from On to Off in all of them just to see the effect in the output of php_info(). By trial and error I found that the correct php.ini to change is

C:\Program files(86)\EasyPHP-12.1\apache\php.ini

in there a line says

extension_dir = "C:\PROGRA~2\EASYPH~1.1\php\php546x130128105026\ext\"

so then I realised Apache's php.ini is fetching the DLL files from an outside folder, while I was modifying a different php.ini in directory

C:\Program Files (x86)\EasyPHP-12.1\php\php546x130128105026

which contains the ext folder! Well I was doing it wrong. I kept the two DLL files in that ext folder and added these two lines in Apache's php.ini

extension=php_sqlsrv_54_ts.dll extension=php_pdo_sqlsrv_54_ts.dll

so now EasyPHP can talk to Microsoft's SQL server as shown in the php_info() output.

http://postimage.org/image/f3psxpnvn/

LittleFighter
  • 163
  • 1
  • 3
  • 13
  • Oh my god, you just saved me from running screaming around the room in anger. Thank you so much. – andli Feb 26 '13 at 14:35