none
Combining Laravel with SQL Server on Azure goes wrong... RRS feed

  • Question

  • 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.

    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)
    ```
    Monday, October 16, 2017 4:44 PM

All replies


  • Why did you add the web.config file?  did you set the webroot to the public directory of the Laravel App? 



    Thursday, October 19, 2017 3:56 AM
  • SQLSTATE[HY000] This error usually occurs when your Laravel app is connecting to the database on the wrong port. I would suggest you to check the logs to see which port it is using to connect.

    I though Forge or Cloudways Laravel hosting (cloudways.com/en/laravel-hosting.php) are the popular choices for Laravel. This is first time I am seeing that someone is using Azure for Laravel.

    Friday, August 2, 2019 2:51 PM