Quantcast
Channel: Microsoft Drivers for PHP for SQL Server forum
Viewing all articles
Browse latest Browse all 391

SQL Server Drivers for PHP 5.3 Silently not working on WindowsXP

$
0
0

I am likely to have to try and install an Apache/PHP combination to connect to an existing SQL Server Express (2008 R2) database all running on a Windows 2003 Server.

Since I won't have admin rights on that server and will need to give the guy who does detailed instructions, I am trying to set up a working version on a Windows XP virtual machine to connect to a database (SQL Server Express 2008 r2) I have running on a Windows 7 virtual machine.

I have downloaded Apache2.4 and the module to link to PHP from apachelounge.  I chose the VC9 versions. Unzipped in to C:\Apache24 as per README

From windows.php.net I have downloaded PHP 5.3 - the thread safe VC9 versions. Unzipped into C:\php

I have downloaded the native client for SQL Server 2008 R2 and I have downloaded SQLSERVER20.exe - installing the files into C:\php\ext.

I only intend to use PDO to access SQL Server so I have copied php-development.ini to php.ini and edited it to add in

[PHP_PDO_SQLSRV]
extension=php_pdo_sqlsrv_53_ts_vc9.dll

and earlier in the file

extension_dir=C:\php\ext

and started up apache.  It seems to have started fine, and the error log doesn't contain any problems.  I have created a simple info.php file that calls phpinfo() and that is displayed.

However there is no reference to the SQL Server driver or that anything is using the PDO extension.

Is this expected?

Just to make sure I ran the PDO sample in the help file (edited to say what the exception was)

Error connecting to SQL Server: exception 'PDOException' with message 'could not find driver' in C:\Apache24\htdocs\sqltest.php:10

So how can I find out what is wrong?



Viewing all articles
Browse latest Browse all 391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>