简体   繁体   中英

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

Configuration Development system

  • Laravel 5.1
  • Good working Vagrant/homestead on windows 10.
  • V1 Production Laravel site working on Vagrant/homestead (non-responsive)
  • V2 production Laravel NOT working on Vagrant/homestead (responsive)

The Steps to narrow the problem:

Part 1 – The basics

  1. Import SQL file with PhpMyAdmin
  2. I have added or changed all the necessary steps (URL, homestead.yaml, hostfile ect)
  3. I have a Working fresh Laravel 5.1 installation

Part – 2 The Migration

  1. Imported a new database with phpMyAdmin
  2. Removed the fresh installation
  3. Copy the new “production environment”
  4. Changed the .env file with the required database information
  5. Load site and BAM an Laravel error “Houston we have got a problem Internal 500 message”

Part – 3 Done so far fixing the problem

  1. Artisan clear cache will make it worse
  2. Removed everything and installed a fresh 5.1 Laravel environment
  3. Copy the folders 1 by one and when I copy the APP directory it will result in an “Internal error 500”

ERROR and LOG 在此处输入图片说明

Part – 4 Conclusion

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.

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.

Solution:

  1. Remove the vendor directory
  2. Remove the composer.lock file
  3. Run composer update -v

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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