laravel 500 内部服务器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17970398/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 08:12:31  来源:igfitidea点击:

laravel 500 internal server error

laravellaravel-4

提问by Joe Tannorella

I'm trying to deploy my Laravel 4 app on 1and1 shared hosting, but I keep getting a 500 internal server error.

我正在尝试在 1and1 共​​享主机上部署我的 Laravel 4 应用程序,但我不断收到 500 内部服务器错误。

I have checked the following:

我检查了以下内容:

  • Using PHP 5.4
  • Mcrypt PHP extension installed
  • chmod 777 /app/storage/
  • Domain is pointing to /laravel/public/
  • 使用 PHP 5.4
  • 已安装 Mcrypt PHP 扩展
  • chmod 777 /应用程序/存储/
  • 域指向 /laravel/public/

I'm out of ideas now?

我现在没有想法了吗?

One thing I've noticed is if I go to /index.php/, I get a "Fatal error: require(): Failed opening required" error. Could this mean some of my paths are wrong somewhere? I doubt it, because the app is working fine locally.

我注意到的一件事是,如果我转到 /index.php/,我会收到“致命错误:require():需要打开失败”错误。这是否意味着我的某些路径在某处是错误的?我对此表示怀疑,因为该应用程序在本地运行良好。

Any help would be amazing.

任何帮助都会很棒。

Thanks

谢谢

回答by jakeharris

Try running composer installafter cloning the repo. The vendor directory is in the Laravel .gitignorefile by default.

composer install克隆 repo 后尝试运行。.gitignore默认情况下,供应商目录在 Laravel文件中。

Edit: just re-read your follow-up comment and realized I shouldn't attempt to answer questions after midnight.

编辑:只需重新阅读您的后续评论并意识到我不应该在午夜之后尝试回答问题。

回答by Joe Tannorella

This turned out being a problem with my deployment method with GIT. For some reason, my app/vendor/laravel directory and contents were not being committed and thus not pulled being pulled/cloned on my shared hosting. Really bizarre and I still do not know what was causing it.

结果证明这是我的 GIT 部署方法的问题。出于某种原因,我的 app/vendor/laravel 目录和内容没有被提交,因此没有被拉取/克隆到我的共享主机上。真的很奇怪,我仍然不知道是什么原因造成的。