I got '500 Internal Server Error' after transfering my project on server.
Hey everyone, I hope you doing well!
I got this problem, I got my project transfered to server. I already made composer install, php artisan key:generate, created and configured .env file.
Yes I did give permission to storagefolder and logs. I did run php artisan cache:clear and php artisan config:cache.
Already run php artisan migrate and php artisan db:seed.
I think that I did everything good but I still got 500 Internal Server Error .
Can anyone suggest what to do or have any opinion about what can cause this 500 Server Error?
Thank you!
In fact I don't have permission because I'm an simple user on my server (I'm limited to my own project folder). We got a sysadmin who manage everything. I already talked to him and he said that must be some configuration issue.
You have an error in your code plain and simple.That is what a 500 error means. If you have show php errors turned of in the php.ini on the server (like you should have for production) then it should be recorded in the webservers logs. Ask him to either send you the logs or check them for you if he doesn't want to give you read access to them (which I think you should have for trouble shooting).
If it runs fine on you local dev machine then there is probably something that is missing on the prodserver that the app expects to be there. It could be a value in a database table, a php dependency that you are referensing that is installed on the prodserver.
If there is nothing appearing in the logs that you can see, and you can't get any information about the server logs, another option is to temporarily change APP_DEBUG to true in your .env which should show you the error on screen.
Just don't forget to change it back to false :)
This is what I do after a release if I get any errors (and its usually down to some folder permissions)
In fact I already have APP_DEBUG set to true in my .env because I already see on logs some errors I had with migrations that were solved. Maybe it's time to talk with my sysadmin to show me webserver logs.
I checked the tables, the migrations and the seeder, all works as expected. And if I would had any migration, database issue that would be registered on logs but no new errors are there.
I think it's time for you to get your louisville slugger and a boom box playing Ramones - Beat On The Brat and walk over to your sysadmin and demand the logs.
Thank you to everyone who tried to help me! I found where the issue was finally.
I had to set permissions also to bootstrap folder and everything works like a charm.
That in fact is the result of my Louisville slugger and Ramones - Beat On The Brat as suggested by @tray2, so I'm going to mark that answer as the best asnwer :P (not doing it just to help someone else if will have same headache as me and to directly see the correct answer)