Laravel 项目,500 内部服务器错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49361509/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel Project, 500 internal server error
提问by Prakhar Singh
I developed a simple application in laravel (5.6) everything works fine on my PC (windows 10/ Xamp / PHP 7.1). but when i upload the same project to a VPS running Cent OS it gives
我在 laravel (5.6) 中开发了一个简单的应用程序,在我的 PC 上一切正常(windows 10/Xamp/PHP 7.1)。但是当我将同一个项目上传到运行 Cent OS 的 VPS 时,它会给出
with PHP 5.6(which is expected)
使用 PHP 5.6(这是预期的)
Parse error: syntax error, unexpected '?' in /home/clarionit/public_html/ambience/c/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233
with PHP
7.0
/ 7.1
/ 7.2
与PHP
7.0
/ 7.1
/7.2
500, Internal server error.
500内部服务器错误。
What I have done so far?
到目前为止我做了什么?
- Permissions for all files and folders are set to
777
(to see if that is a problem) - Replacing
index.php
code with something simpler likephpinfo()
works perfectly.
- 所有文件和文件夹的权限都设置为
777
(查看是否有问题) index.php
用更简单的东西替换代码phpinfo()
效果很好。
Ask for any more information needed, Please tell me what can be causing the 500, internal server error
.
询问需要的更多信息,请告诉我可能导致500, internal server error
.
回答by Sateesh
Laravel 5.6 requirement should be installed in system
系统中应安装 Laravel 5.6 要求
- PHP >= 7.1.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- PHP >= 7.1.3
- OpenSSL PHP 扩展
- PDO PHP 扩展
- Mbstring PHP 扩展
- 分词器 PHP 扩展
- XML PHP 扩展
- Ctype PHP 扩展
- JSON PHP 扩展
Once run these commands, I hope your problem will resolve.
运行这些命令后,我希望您的问题会得到解决。
rm -rf vendor
rm -rf storage/framework/cache/*
rm -rf storage/framework/session/*
rm -rf storage/framework/views/*
rm composer.lock
composer clear-cache
composer install