microsoft php sql server driver php_pdo_sqlsrv_54_ts.dll not loaded
Posted by: emollemans (---.Red-83-35-234.dynamicIP.rima-tde.net)
Date: February 19, 2014 12:03PM

Hi All,

I'm running wampserver 64 bit version with:

Apache : 2.4.4 MySQL : 5.6.12 PHP : 5.4.12 PHPMyAdmin : 4.0.4 SqlBuddy : 1.3.3 XDebug : 2.2.3

I have downloaded the Microsoft Drivers 3.0 for PHP for SQL Server.

I have put the drivers in my ext folder C:\wamp\bin\php\php5.4.12\ext

php_pdo_sqlsrv_54_ts.dll

php_sqlsrv_54_ts.dll

I have changed my php.ini file to included:

extension=php_sqlsrv_54_ts.dll
extension=php_pdo_sqlsrv_54_ts.dll

I have restarted my PC.

When I run the following php code:

<?php


$database = "master";
$conn = new PDO( "sqlsrv:server=(local) ; Database = $database", "", ""winking smiley;

?>

I still get the following error message:

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in W:\wamp\www\sqlservertestV02.php on line 4

I have tried everything I can think of but the driver does not seem to load correctly.

Any help would be greatly appreciated.

Kind regards,

Ernst.

Options: ReplyQuote
Re: microsoft php sql server driver php_pdo_sqlsrv_54_ts.dll not loaded
Posted by: RiggsFolly (---.as13285.net)
Date: February 19, 2014 03:13PM

As far as I know the MSSQL driver is 32bit only. I took a look at the download page and they dont actually make that clear but I believe it is so.

You will have to uninstall WAMP 64bit
Manually delete the \wamp\ folder and all sub fiolders

Install the 32 bit WAMP 2.4

Apply these fixes for the 2.4 release [forum.wampserver.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: microsoft php sql server driver php_pdo_sqlsrv_54_ts.dll not loaded
Posted by: emollemans (---.Red-83-35-234.dynamicIP.rima-tde.net)
Date: February 19, 2014 04:39PM

Ok smiling smiley.

I tested it and it works fine now.

I also needed to change the user that start the wampapache service otherwise I get login errors from sql server.

!!!Thanks!!! a lot for your help Riggs smiling smiley

Options: ReplyQuote
Re: microsoft php sql server driver php_pdo_sqlsrv_54_ts.dll not loaded
Posted by: RiggsFolly (---.as13285.net)
Date: February 19, 2014 06:15PM

How did you do the User change? If you dont mind me asking!

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.