0

I'm trying to deploy a Laravel Application to Azure using the App Service.

Things are working pretty ok, I set the PHP version to 7.1, added the Composer extention, and added a web.config file in the public folder of my repo for supporting rewrites in IIS. After that I deployed through Git. I also set the correct environmental variables:

enter image description here

The only problem is, I can't connect to the Azure SQL Database. It gives me this strange Protocol Error, which I can't solve. Google only shows old answers... I hope someone can help me?

SQLSTATE[HY000]: [Microsoft][ODBC Driver 13 for SQL Server]Protocol error in TDS stream (SQL: select * from [settings]) (View: D:\home\site\wwwroot\........\resources\views\login.blade.php)

hokkaidi
  • 858
  • 6
  • 19
Milkmannetje
  • 1,152
  • 1
  • 10
  • 35
  • Typically a network issue or ODBC drivers are corrupt or obsolete. Try reinstalling latest ODBC drivers on the client. – miken32 Oct 13 '17 at 17:36
  • Alright, but what if the client is a cloud instance? Just using the App Service from Azure. How can I upgrade the driver? – Milkmannetje Oct 13 '17 at 18:04
  • *`Protocol error in TDS stream` typically indicates dropped packets during the communication. Try a simple query that will not return many results.* See @miken32's comment [here](https://stackoverflow.com/questions/46223476/laravel-sql-server-sqlstatehy000-unixodbcmicrosoftodbc-driver-13-for-sq). – Aaron Chen Oct 16 '17 at 09:43
  • I'm trying a simple query... just a SELECT! – Milkmannetje Oct 16 '17 at 17:14
  • The ODBC Driver 13 for SQL Server is the latest driver. Can you share the DDL and sample data for that table? – David Browne - Microsoft Oct 16 '17 at 17:23

1 Answers1

0

Alright, it turned out to be a corrupted instance of the Azure Web App. After deleting the App, and deploying a new clean version, it started working perfectly.

Milkmannetje
  • 1,152
  • 1
  • 10
  • 35