因此,我刚开始使用azure部署,我尽力使用microsoft文档教程https://learn.microsoft.com/en-us/azure/app-service/tutorial-php-mysql-app?pivots=platform-windows
在“部署到Azure”之前,一切都很好:
git推天主
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.gitDeployment > Logs中的日志详细信息显示,我提交的细节日志失败了
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我试着再推一次,上面写着“已经是最新的”
我试着从蔚蓝复制回购,做作曲家安装然后php工艺服务..。它在本地工作,所以我假设问题在部署配置中。有人能帮助解决生产问题吗?
提前谢谢。
发布于 2021-11-12 04:58:32
当您在“azure”上推送与应用程序部署分支不匹配的本地分支时,会发生此错误Error - Changes committed to remote repository but deployment to website failed.。
master。若要更改默认分支,请使用DEPLOYMENT_BRANCH应用程序设置(请参阅变更部署分支)。您还会得到Trying to access array offset on value of type null错误,这是失败的composer。
composer update或
php composer.phar update

您可以参考部署疑难解答和“试图访问空类型值上的数组偏移量”
https://stackoverflow.com/questions/69937721
复制相似问题