gpt4 book ai didi

php - Laravel 和 Azure 错误 : Internal Server Error

转载 作者:行者123 更新时间:2023-12-03 01:49:29 25 4
gpt4 key购买 nike

我在 Microsoft Azure 上有一个使用 Laravel 5.2 和 PHP 7 的应用服务。我遇到的问题是,有时在浏览网站时会收到错误:

this page cannot be displayed because an internal server error has occurred

这种情况是随机发生的,但当它发生时它会阻塞路线,例如我正在毫无问题地浏览地址 http://elsitio.com/details/12然后我再次单击,它会抛出错误。

要消除该错误,我必须重新启动应用程序服务,它会正常工作,因此我认为它与应用程序中的 View 缓存有关。

除了设置 Laravel .env 之外,我还没有进行任何配置。

使用 phpinfo,我发现该站点似乎在 FastCGI 上运行,但我对此不太确定,因为显示的错误似乎是由 IIS 管理的。

我的问题是:

  1. Any ideas on what may be causing the problem?

  2. How can I restart FastCGI/IIS service without restarting the App Service, for example in Apache over Linux would be service httpd
    restart
    .

更新1

这是一个非常奇怪的错误,有时我会收到一些组件丢失的错误:找不到接口(interface)'Illuminate\Contracts\Queue\QueueableCollection'然后我执行$:composer install 它开始工作,然后我重新加载页面,并收到另一个与缺少组件相关的错误。

如果我更改 PHP 版本,它会再次开始工作:(。

最佳答案

通常,当你得到500 http错误时,这意味着你可能发生了php fatal error 。您可以启用显示错误配置来诊断错误。同时,考虑到您遇到随机问题,您还可以启用错误日志,以跟踪问题。

您可以引用Info About PHP Fatal Error and Error Log on Azure Website了解更多信息。也可以引用How to: Change the built-in PHP configurations .

如有任何进一步的疑问,请随时告诉我。

关于php - Laravel 和 Azure 错误 : Internal Server Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40806251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com