Connection to sqlsrv
string not working.
$login = new PDO("sqlsrv:server=MYSQLSERVER\SQLEXPRESS;Database=db_name", "user", "passw");
And i have error message:
Fatal error: Invalid handle returned
.
I'm 101% sure that login details is OK. Because it works on other projects. Could be a problem PHP 7
?
Try "ConnectionPooling=0" in DSN.
sometimes working and sometimes return error
It might be a problem on re-using connection.
DSN Reference: https://msdn.microsoft.com/en-us/library/ff628167(v=sql.105).aspx
There's a problem with PHP Sql Server driver
You should update it to new version
As you mentioned you are using windows, this version is fully working on windows
https://github.com/Microsoft/msphpsql/releases/tag/v4.1.1-Windows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With