简体   繁体   English

内部错误500:在运作良好的Vagrant / Homestead环境中托管我们最新的Laravel 5.1网站

[英]Internal Error 500: Hosting our latest Laravel 5.1 site on good working Vagrant/Homestead environment

Configuration Development system 配置开发系统

  • Laravel 5.1 Laravel 5.1
  • Good working Vagrant/homestead on windows 10. 在Windows 10上正常工作的Vagrant /宅基地
  • V1 Production Laravel site working on Vagrant/homestead (non-responsive) V1 Production Laravel网站正在Vagrant / homestead上工作(无响应)
  • V2 production Laravel NOT working on Vagrant/homestead (responsive) V2生产Laravel 不是在流浪工作/宅基地(响应)

The Steps to narrow the problem: 缩小问题的步骤:

Part 1 – The basics 第1部分–基础

  1. Import SQL file with PhpMyAdmin 用PhpMyAdmin导入SQL文件
  2. I have added or changed all the necessary steps (URL, homestead.yaml, hostfile ect) 我已经添加或更改了所有必要的步骤(URL,homestead.yaml,hostfile等)
  3. I have a Working fresh Laravel 5.1 installation 我有一个可以正常工作的Laravel 5.1安装

Part – 2 The Migration 第2部分-迁移

  1. Imported a new database with phpMyAdmin 使用phpMyAdmin导入了新数据库
  2. Removed the fresh installation 删除了全新的安装
  3. Copy the new “production environment” 复制新的“生产环境”
  4. Changed the .env file with the required database information 使用所需的数据库信息更改了.env文件
  5. Load site and BAM an Laravel error “Houston we have got a problem Internal 500 message” 加载站点和BAM,出现Laravel错误“休斯顿,我们遇到了一个内部500消息问题”

Part – 3 Done so far fixing the problem 第3部分-到目前为止,已解决问题

  1. Artisan clear cache will make it worse 工匠明确的缓存将使情况变得更糟
  2. Removed everything and installed a fresh 5.1 Laravel environment 删除所有内容并安装了新的5.1 Laravel环境
  3. Copy the folders 1 by one and when I copy the APP directory it will result in an “Internal error 500” 一对一地复制文件夹,当我复制APP目录时,将导致“内部错误500”

ERROR and LOG 错误和日志 在此处输入图片说明

Part – 4 Conclusion 第4部分结论

We have a good working vagrant/homestead environment and it goes wrong when I am migrating the new production site to this configuration. 我们有一个良好的无业游民/宅基地环境,当我将新的生产站点迁移到此配置时,它出错了。 The difference between V1 and V2 is that V1 (working on vagrant/homestead) is a non-responsive site and V2 is the same site but completely responsive. V1和V2之间的区别在于V1(在无业游民/宅基地上工作)是一个无响应站点,而V2是同一站点,但是完全响应站点。

Any tips on how to solve this issue 有关如何解决此问题的任何提示

By deepdiving more in the log files I have finally fixed the issue. 通过深入研究日志文件,我终于解决了该问题。

Only removing the vendor directory wasn't enough you must also remove the .lock file. 仅删除供应商目录还不够,您还必须删除.lock文件。

Solution: 解:

  1. Remove the vendor directory 删除供应商目录
  2. Remove the composer.lock file 删除composer.lock文件
  3. Run composer update -v 运行composer update -v

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM