Migrating to Production (Login doesn't work anymore)
Created 6 years ago by powerball12

Hi, I made a project on my local machine and it worked perfect. When i tried to migrate to the production server there are 2 problems.

  • Cache is crashing the website (gives 500 error) PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:752 after deleting the cache the site seems to work.
  • I cant login anymore. After i put in my credentials it redirects me to www.domain.com/form/handle/b0e1c45b82c4b9336b92ca048f115350 and gives me a "Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message" any idea how to fix this?
powerball12  —  6 years ago Best Answer

Fix by forcing SSL

ryanthompson  —  6 years ago

Sounds like it might have been an environmental issue? Mind sharing info on your setup just for anyone who stumbles onto this later? Also I am curious 😊

powerball12  —  6 years ago

Well the cache is still not working. But currently I'm not caching so that fixes that. The problem with the login was the ssl. The production server redirects to HTTPS but in de form action it said HTTP. This lead to a 302 error in the form handler. To fix this you have to add FORCE_SSL=true and it's working just fine