PHP 7.1 Connecting to MS SQL 2012 Error
Good day,
I am using Laragon latest version. PHP 7.1. Trying to connect to remote MS SQL 2012 server but I keep receiving the following error:
PDOException in Connector.php line 55:could not find driver
In Laragon I have the following extensions enabled and the DLL's exists in "C:\laragon\bin\php\php-7.1.5-Win32-VC14-x64\ext" folder.
php_pdo_sqlsrv_7_ts_x86.dll
php_sqlsrv_7_ts_x86.dll
When starting webserver I get following errors in php error log:
[19-Jun-2017 14:50:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/laragon/bin/php/php-7.1.5-Win32-VC14-x64/ext\php_sqlsrv_7_ts_x86.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
[19-Jun-2017 14:50:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/laragon/bin/php/php-7.1.5-Win32-VC14-x64/ext\php_pdo_sqlsrv_7_ts_x86.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
[19-Jun-2017 14:50:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/laragon/bin/php/php-7.1.5-Win32-VC14-x64/ext\php_sqlsrv_7_ts_x86.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
[19-Jun-2017 14:50:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/laragon/bin/php/php-7.1.5-Win32-VC14-x64/ext\php_pdo_sqlsrv_7_ts_x86.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
Why is it such a mission to connect to MS SQL. I remember this as always been a super huge challenge :)
Thanks in advance to all the people willing to help!
@Sven0188 : You are using PHP 7 32-bit version of dll for PHP 7.1 64-bit.
Adding PHP extensions should be easy with Laragon.
Check the tutorial here:
Please or to participate in this conversation.