On Windows 10 64bit with PHP 7.1 beta2, i am unable to load php_sqlsrv_ts.dll, newest release from 4.1.0 Windows. https://github.com/Azure/msphpsql/releases/download/4.1.0/php_sqlsrv_4.1.0_x64.zip
I have installed Microsoft ODBC Driver 11, 12, 13.1 but nothing worked, i still cannot get the extension to load. If i switch back newest PHP 7.0.x (simply overwriting the files) and restart apache, all work fine with the 4.1.0 release from sqlsrv.
So, i have no idea how to fix this. Is it a bug in the sqlsrv driver or in PHP 7.1?
The exact and only error message i get is: in Unknown on line 0
[19-Aug-2016 05:55:14 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/srv/php7/ext\php_sqlsrv_7_ts.dll' - Die angegebene Prozedur wurde nicht gefunden.
in Unknown on line 0
With PHP 7.0.x there is no such error and all work as expected.
I am having the same issue. I am running PHP 7.1.10 TS with Apache2.4 on windows.
I think isn't compatible yet, it is build for php 7.0 not for php 7.1. Read this comment.
@all the drivers are not compatible with PHP 7.1 yet. We are looking into this and will keep you posted.
@meet-bhagdev Is there any possibility to get the working driver now a timely manner for the 7.1 release? Maybe in the RC state of PHP 7.1? Here we always want to use newest features but we mostly bound to this driver to use it in production. Nice work anyway, just ping you to get this faster done as with PHP 7 release.
@brainfoolong Are you looking to use the driver with PHP 7.1? We are working on this actively and you will soon have a preview release that will work with PHP 7.1.
@meet-bhagdev Exactly what i've meant. Thx for information.
@brainfoolong the 4.1.3 release contains pre-compiled binaries for PHP 7.1.
Thank you. Works great with newest RC candiate of PHP 7.1 - This is all what i've expected, a release of that driver before PHP 7.1 stable release. Great support, thanks.
Downloaded the RC drivers and works great for 7.1! Thanks for your guys hard work @meet-bhagdev :)
I have downloaded https://github.com/Microsoft/msphpsql/releases/tag/v4.1.3-Windows release, and it's work like a charm
I have the same problem. I have PHP 7.1.4 with XAMPP in Windows... and the driver does not work. I downloaded the 4.2.0 and 4.3.0 RC and does not work... anybody can help me?
@nessroman, you need to download the latest RC shown above:
https://github.com/Microsoft/msphpsql/releases/tag/v4.1.3-Windows
This is the release for PHP 7.1 support.
@stevebauman I'm download the files from your link and using the _ts.dll x64 and does not work for me :( ....
@nessroman Is your PHP installation 64 bit?
Ohh Sorry @stevebauman My PHP is x86 and mi PC x64 ... this is the reason for the x64 dll does'nt work ... Thank you very much for your help. Now, my Windows XAMPP is configured, but I need the same in Ubuntu 16.04. Need enable the sqlserver driver for php 7.1 in Ubuntu, is my next adventure. Thanks !
Awesome @nessroman, glad you got it working! No problem :)
I'm using PHP 7.0.10 with Wamp in Windows 64 bit and downloaded drivers 4.0,
php_pdo_sqlsrv_7_ts_x64.dll
php_sqlsrv_7_ts_x64.dll
Loaded them into the php extension file, and copied the file names into php.ini, but I still get this error; 'undefined function sqlsrv_connect()'
I've gone through numbers of threads looking for solution. Can anyone help me?
Hi @saifulmujahid it's usually cuz some missing pre requisites. Is wamp x64? Have you downloaded Microsoft ODBC Driver 13.1 for SQL Server?
Hi @sirio3mil yeah I'm using wamp x64, the driver is also x64, and yup, Microsoft ODBC Driver 13.1 SQL Server installation done. Where else could go wrong? I noticed the installed drivers didn't come out in the PHP extensions list though, does that bring a hint?
Try to check wamp error log, if there are problems loading drivers should appear, if not, problems are before PHP try to load it.
@sirio3mil This is the latest error I got when trying to run connection.php file.
Uncaught Error: Call to undefined function sqlsrv_connect() in C:\wamp64\www\project2\connection.php:6
Stack trace:
thrown in C:\wamp64\www\project2\connection.php on line 6
@saifulmujahid this error means that sqlsrv driver has not been loaded, could you post the result of php -m and the snippet of your ini file where you have enabled extensions. Also check extension_dir in the ini file and make sure it is pointing to the dll location

extension_dir

extensions in php.ini
@Hadis-Fard Should I include the path along with each extension in php.ini? The php.ini edited is also the one located in
C:\wamp64\bin\apache\apache2.4.23\bin
I tried not including and including it and both still displayed the undefined error. Seriously, don't know what else to do. Sorry, how to get the result of php -m?
It is not necessary to include the complete path with the library name.
Go to command line, navigate to your php folder and then write php -m command

Ran the php -m command. @sirio3mil , @Hadis-Fard Hope this could provide useful info.
@Hadis-Fard what are you trying to look for?
So i read everything on this page, and i still dont resolve this error. I have win 10 64bit and wamp server. I install newest ODBC driver from microsoft site and error still pop up. PhP work perfectly on my pc win 7, but on lap top it want. I m new at this and maybe i miss some step.I would be eternally grateful to anyone who help me out with this

.
Hi @kockica1234
Based on the error message the problem you see is not really related to this particular issue, nor is it related to our drivers.
Nonetheless, looks like php_intl.dll is missing in your env. This might be helpful to you.
If you have problems related to our drivers, please create a new issue, and we will be happy to assist you.
I am trying to run sqlsrv_71_nts_64, and i keep getting this message.

This is what my extension_dir looks like

and these are the extensions I am looking at

Is anyone else getting this?
Hi @shivamg42 , please create a new issue and reference this instead.
Looks like the sqlsrv dlls do not exist in your extension path. Can you double check that?
Also, what's the output of php -v?
I just installed mssql tools for php on a Debian 8 image with php 7.1 and have this issue.
It should be fixed with the latest version, right?
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlsrv.so' - /usr/lib/php/20160303/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver in Unknown on line 0
Hi @mokhosh
Did you follow the installation instructions and its dependencies like ODBC driver?
Also, have you checked our FAQ
If you still need help, please create a new issue.
@nessroman I have the same problem锛宎ccording to your method, I have solved it. Thank you so much.
PHP version with php_sqlsrv version
Hi
have installed PHP 7.2.13, Apache 2.4.37 (Win64) & MySQL 8.0.13 and wants to connect sqlsrv_connect but I got error Uncaught Error: Call to undefined function sqlsrv_connect() in
Hello
I have also installed sqlsrv on my Linux Ubuntu 16.04, I have read the thread above and downloaded the RC .zip. But how do I install or where to put that file when I am using Linux 16.04 .
Thank you very much.
@sincerodel please follow the instructions here to get the latest release.
@yitam Thank you very much.
You're welcome @sincerodel
Please create a new issue if you run into any problem but can't find an answer in our FAQ or in other existing issues.
Instead of being windows 64-bit operating system i never get any error message after coping thr x64-bit supported dll.I dont know why so that i tried for 4 days with different x64 bit dll of SQLSRV greater than 4.1 where as my php version is 7.1.9 and sql server 2008.
After all those tried i want to check from cmd using php --ini command then i found the error i attached and just replace a dll of x32 bit and its done :).
I am really happy now.so please test using cmd for better output.
hi @shoaib0906, please download the PHP drivers to match the PHP version (7.1 or above), arch (x64 or x86) and thread (nts or ts) and read how to load the drivers
@yitam thanks for comments and i solved already from previous comments.It was fantastic after few days to came into success.
SOLVED all my issues, just setting in httpd.conf
PHPInidir=
must check if the extensions are loading in php ( not apache ) with
php -m
on a command line
Most helpful comment
@nessroman I have the same problem锛宎ccording to your method, I have solved it. Thank you so much.