Azure php Error Deployment from local git - using tutorial

Gradiyanto Sanjaya 1 Reputation point
2021-11-11T15:50:07.947+00:00

Hi, so I'm new to azure deployment and I try my best to use the microsoft documentation tutorial
https://learn.microsoft.com/en-us/azure/app-service/tutorial-php-mysql-app?pivots=platform-windows

everything is fine until "Deploy to Azure" Step in :

git push azure main

remote:   [ErrorException]  
remote:   Trying to access array offset on value of type null  
remote: An error has occurred during web site deployment.  
remote:  
remote: composer failed  
remote:  
remote:  
remote: Error - Changes committed to remote repository but deployment to website failed.  
To https://phpmysqldemogs.scm.azurewebsites.net/phpMysqlDemoGS.git  

The log detail from Deployment Center > Logs show I have failed commit with detail log

Command: bash deploy.sh  
Creating app_offline.htm  
KuduSync.NET from: 'C:\home\site\repository' to: 'C:\home\site\wwwroot'  
Deleting app_offline.htm  
Running composer install  
  
                                                         
  [ErrorException]                                       
  Trying to access array offset on value of type null    
                                                         
An error has occurred during web site deployment.  
  
composer failed  
[ErrorException]                                     \r\n  Trying to access array offset on value of type null\r\nC:\Program Files (x86)\SiteExtensions\Kudu\95.30831.5373\bin\Scripts\starter.cmd bash deploy.sh  

But when I tried to push again, it says "already up to date"

I tried to clone the committed repo, do composer install then php artisan serve ... it worked locally, so I assume that the problem is in deployment configuration. Can anyone help the production problem?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,251 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 29,651 Reputation points Microsoft Employee
    2021-11-17T04:01:10.847+00:00

    Hi @Gradiyanto Sanjaya ,

    Welcome to Azure and apologies for receiving such a delayed response. To add insult to injury, using Laravel is best used on Linux rather than Windows. The is some rework that needs to be done to the Windows tutorial; see https://github.com/MicrosoftDocs/azure-docs/issues/73397#issuecomment-824010944, to correct the runtime issues with this tutorial.

    If you have any issues with the Linux tutorial, please do comment down below.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.