0

Recently upgraded PHP7 to PHP8 and updated Apache version. All PHP scripts connecting to SQL Server now throwing following error:

Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => -2146893019 [code] => -2146893019 [2] => [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: The certificate chain was issued by an authority that is not trusted. [message] => [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: The certificate chain was issued by an authority that is not trusted. ) [1] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => -2146893019 [code] => -2146893019 [2] => [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection [message] => [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection ) )

ODBC driver is already installed. Any suggestion will be appreciated.

I tried to reinstall ODBC driver to latest version, but no results so far.

Zhorov
  • 28,486
  • 6
  • 27
  • 52
  • 1
    Which driver do you use to connect to the SQL Server instance? Can you post one of your PHP scripts? This [Q&A](https://stackoverflow.com/questions/71709139/php-to-mssql-server-errro-ssl-provider-the-certificate-chain-was-issued-by-an-a) is also a possible solution to your problem. – Zhorov Dec 07 '22 at 08:01
  • 1
    Have you read the [ODBC Driver 18.0 for SQL Server Released](https://techcommunity.microsoft.com/t5/sql-server-blog/odbc-driver-18-0-for-sql-server-released/ba-p/3169228) notes yet? In particular, read the whole section about _**BREAKING CHANGE** - Default Encrypt to Yes/Mandatory._ – AlwaysLearning Dec 07 '22 at 09:47

0 Answers0