Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code 0x2746 #1278

Closed
omaromp2 opened this issue Jul 7, 2021 · 11 comments
Closed

Error code 0x2746 #1278

omaromp2 opened this issue Jul 7, 2021 · 11 comments

Comments

@omaromp2
Copy link

omaromp2 commented Jul 7, 2021

.+Please check the FAQ (frequently-asked questions) first. If you have other questions or something to report, please address the following:

+## PHP Driver version or file name

  • 5.9
    +## SQL Server version

+## Client operating system

  • Ubuntu 20.04
    +## PHP version
  • 7.4

I keep getting this connection error "Error code 0x2746" , after following the installation instruccions

@yitam
Copy link
Contributor

yitam commented Jul 7, 2021

Hi @omaromp2

What is the version of your SQL Server? It matters. Please check this FAQ entry about Ubuntu 20.04

@omaromp2
Copy link
Author

omaromp2 commented Jul 7, 2021

hi @yitam ,
Thanks for the quick reply.
The sqlsrv version is 2012 is not hosted in my machine. This is my work machine and I have never had a problem connecting with other versions

@omaromp2
Copy link
Author

omaromp2 commented Jul 7, 2021

@yitam
Sorry If I gave too little info, I'm going to try to install the 5.6.1 version with pecl.
This might work.
Thanks for your support

@yitam
Copy link
Contributor

yitam commented Jul 7, 2021

Hi @omaromp2 , no it's not the drivers but Ubuntu 20.04 has raised its security bar. You won't be able to connect to any SQL Servers older than SQL Server 2017. You need a workaround, and please check aforementioned FAQ entry for details.

@omaromp2
Copy link
Author

omaromp2 commented Jul 7, 2021

@yitam , thanks for the FAQ.
I tried modifying the openssl.cnf however I keep getting the same error.
SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
Thanks in advanced.

@yitam
Copy link
Contributor

yitam commented Jul 8, 2021

@omaromp2 please provide more details, and as you can see in the FAQ entry, many people have similar issues. They have different needs or requirements (some using Docker, etc.) and provide their workarounds. Have you checked them all?

@omaromp2
Copy link
Author

Hi @yitam, sorry for the delay.
Due to the Error that I get:
''SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746"
I followed the current issue from the FAQ.
#1112
However, after I configure the openssl.cnf file, I keep getting the same error.

I ended up downgrading to ubuntu 18.10 and the install was easy and it worked from the get go.
It would be nice to find a workaround on ubuntu 20.

As always, I'm very thankful for your help. 👍

@yitam
Copy link
Contributor

yitam commented Jul 12, 2021

Hi @omaromp2

Glad to hear that you managed to install the drivers and connected successfully. However, Ubuntu 18.10 was out of support so perhaps Ubuntu 18.04 LTS is a better option?

The workarounds are not really recommended because there's a reason for Ubuntu 20.04 to raise the security bar. If possible, please consider upgrading your server to SQL Server 2017 or later.

@yitam
Copy link
Contributor

yitam commented Jul 21, 2021

Any update, @omaromp2 ?

@omaromp2
Copy link
Author

Hi @yitam,
Thank you for the follow-up.
At the moment we are unable to upgrade the DB due to other legacy apps.
So I'm running my apps in Ubuntu 18.04.
On Ubuntu 20.04 I keep getting the error:
SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
Thank you for your support.

@omaromp2
Copy link
Author

Fixed it!!!!
First of all, thanks for the FAQ links and shedding some light on what was happening to my connection.
This is the link I followed in order to connect to sqlsrv 2012.
https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level
@yitam Thank you very much for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants