ssh laravel 服务器拉取存储库显示错误 500?

发布于 2025-01-11 00:45:09 字数 2684 浏览 0 评论 0原文

我正在尝试运行一个项目。我已经通过 ssh 拉取存储库。但拉取时出现错误。当我尝试访问该网页时,它显示错误:
首页 url 显示:

example.com is currently unable to handle this request.
    HTTP ERROR 500

我的 linux 服务器 apache2 正在运行。但是当我在 error.log 上检查 /etc/log/apache2 上的错误时,它显示:

           [Mon Feb 28 00:00:14.453907 2022] [mpm_prefork:notice] [pid 774] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
        [Mon Feb 28 00:00:14.453934 2022] [core:notice] [pid 774] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Feb 28 04:26:16.096546 2022] [php7:error] [pid 14891] [client ......:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.096593 2022] [php7:error] [pid 14891] [client ....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0
        [Mon Feb 28 04:26:16.097333 2022] [php7:error] [pid 14891] [client .....:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.097351 2022] [php7:error] [pid 14891] [client .....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0
 [Mon Feb 28 00:00:14.453934 2022] [core:notice] [pid 774] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Feb 28 04:26:16.096546 2022] [php7:error] [pid 14891] [client ......:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30<br>
        [Mon Feb 28 04:26:16.096593 2022] [php7:error] [pid 14891] [client ....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0<br>
        [Mon Feb 28 04:26:16.097333 2022] [php7:error] [pid 14891] [client .....:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.097351 2022] [php7:error] [pid 14891] [client .....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0

对于 Php 解析错误,我使用以下命令配置composer.json 文件

 "config": {
            "platform": {
                "php": "7.4.27"
             }
       }

并运行:
composer dump-autoload< /code>,它仍然显示相同的错误
我删除了供应商目录和composer.lock文件,并通过运行composer install
重新安装依赖项 仍然显示错误
我已授予公共和存储文件夹完全权限

我被卡住了,无法访问该网页。
任何建议、建议、解决方案都将受到高度赞赏。
提前致谢!!

I'm trying to run a project. I have pull the repository through ssh. But there are errors while pulling. and when I try to access the webpage, it show errors:
The front page url shows :

example.com is currently unable to handle this request.
    HTTP ERROR 500

My linux server apache2 is running. But when i check the error on /etc/log/apache2 on error.log, it shows:

           [Mon Feb 28 00:00:14.453907 2022] [mpm_prefork:notice] [pid 774] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
        [Mon Feb 28 00:00:14.453934 2022] [core:notice] [pid 774] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Feb 28 04:26:16.096546 2022] [php7:error] [pid 14891] [client ......:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.096593 2022] [php7:error] [pid 14891] [client ....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0
        [Mon Feb 28 04:26:16.097333 2022] [php7:error] [pid 14891] [client .....:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.097351 2022] [php7:error] [pid 14891] [client .....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0
 [Mon Feb 28 00:00:14.453934 2022] [core:notice] [pid 774] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Feb 28 04:26:16.096546 2022] [php7:error] [pid 14891] [client ......:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30<br>
        [Mon Feb 28 04:26:16.096593 2022] [php7:error] [pid 14891] [client ....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0<br>
        [Mon Feb 28 04:26:16.097333 2022] [php7:error] [pid 14891] [client .....:59882] PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/admin/vendor/psr/log/src/LoggerInterface.php on line 30
        [Mon Feb 28 04:26:16.097351 2022] [php7:error] [pid 14891] [client .....:59882] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0

For Php parse error, I configure composer.json file with

 "config": {
            "platform": {
                "php": "7.4.27"
             }
       }

and run:
composer dump-autoload, it still shows the same errors
i remove the vendor directory and composer.lock file and reinstall the dependencies by running composer install
still it shows the error
I have given full permission to public and storage folder

I'm stuck onto it and could't access the webpage.
Any advice, suggestion, solution will be highly appreciated.
Thanking in advance!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文