Comments (9)
You can try setting MinProtocol to TLSv1.0
and CipherString to DEFAULT@SECLEVEL=0
, but the best approach is to patch the server to support TLS 1.2
from msphpsql.
I am having a similar issue, sqlcmd, isql, and even setting up the connection in PHP using "new PDO('odbc:Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.3.1;...connection string here);" works....but sqlsrv_connect fails with "Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server." code 26, sqlstate 08001; code 10054, [Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746. A tcp dump shows proper TLSv1.2 handling with all tools mentioned above, however, a tcp dump with sqlsrv_connect shows only 8 packets before the connection is interrupted. The PHP environment is PHP 8.0.30. The same occurs regardless of using PHP 7.4 to 8.3. Also worth nothing the TCP dump shows the source and destination ports to be the same for every packet, whereas PDO, isql, and sqlcmd all have a randomized starting port. The sql instance is using a custom tcp port. The sql server requires TLS 1.2, and is SQL Server 2016.
from msphpsql.
Which operating system is this one?
from msphpsql.
Which operating system is this one?
Cloudlinux/AlmaLinux 8. 64bit.
from msphpsql.
Does it give the same error when using only ODBC (isql, sqlcmd)? Or is it specific to PHP driver?
from msphpsql.
Does it give the same error when using only ODBC (isql, sqlcmd)? Or is it specific to PHP driver?
The error is only specific when using the sqlsrv.so native module within PHP, isql, sqlcmd, and $pd = new PDO('odbc:Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.3.1;SERVER= dsn works just fine within PHP, but we are unable to use the PDO driver in this manner as the odbc function to permit multiple active results sets does not appear to work within PDO.
We specified both version 18 and version 17 and got the same errors out of the msphpsql modules.
from msphpsql.
Related Issues (20)
- SQLSTATE[HY000]: [Microsoft][ODBC Driver 18 for SQL Server]Unicode conversion failed HOT 14
- CentOS9 SQL Server 2014 connect failed. Microsoft ODBC Driver 18 for SQL Server : TCP Provider: Error code 0x2746. HOT 7
- Cakephp2 Application takes longer time to fetch data from sql server database resulting php memory error HOT 3
- Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server HOT 2
- Memory leak in Microsoft ODBC Driver 17.10.5 for SQL Server HOT 4
- HY104 Invalid precision value when reusing prepared statement HOT 4
- SQLSTATE[01002] Adaptive Server connection failed (xxx.xx.xx.xxx) HOT 2
- Issue connecting to SQL server from Openshift HOT 2
- Unable to build version 5.12.0beta1 on Windows HOT 3
- New attribute for sql bigint and decimal/numeric types to php int and float types HOT 1
- Performance problem when using params on select query HOT 3
- Error on both ARM64 and AMD64 docker build HOT 1
- apt fails to install from pmc-geofence.trafficmanager.net: 403 Forbidden HOT 10
- Error requesting access token while Azure webapps (php) connect to Azure SQL server by UMI HOT 4
- Windows DLL available to download HOT 29
- unable to install in ubuntu 22.04 container HOT 1
- When will there be support for installing Ubuntu 24.04? HOT 1
- Error OpenSSL Shutdown while in init - cURL - MSSQL HOT 6
- SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:0A0C0103:SSL routines::internal error] HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msphpsql.