Location of PHP error logs in Laravel Homestead
I just had this problem too.
Finally I figured out that it was because my custom Laravel code (that I'd downloaded from my Bitbucket repo onto a new computer) included custom code in bootstrap/app.php
at the $app->configureMonologUsing
line, and I hadn't properly set up a new .env
file.
I guess it can be dangerous / fragile to mess with the default logger.
But now that I fixed my .env
, the logs correctly appear in /storage/logs/laravel.log
.
Admin
Updated on June 08, 2022Comments
-
Admin almost 2 years
I'm currently experiencing routing issues, where various pages of my application are returning white pages.
Where are the PHP logs located within Homestead Vagrant so I can diagnose what's the issue?
I've checked
/var/log/
and I can only see aphp7.0-fpm.log
that relates to PHP, but nothing is generated within here when I read it.-
Quynh Nguyen over 7 yearsAre you chmod 777 for storage and bootstrap folder?
-
Shoaib Rehan over 7 yearsLog file path: laravel root folder/storage/logs/laravel.txt
-
Ryan about 7 yearsI am so disappointed in in Laravel Homestead. Getting it set up has taken me hours, and finally I can see my website in my browser, but I can only see a 500 error page, and I can't find the logs anywhere. Vagrant and Homestead have been a waste of my time so far. I'd love to see what I'm doing wrong.
-
Sabrina Leggett about 7 years@Ryan Try c9.io next time - Homestead was huge waste of time for me too.
-
agileMike over 4 yearsI know this thread is a couple years old but fwiw I also ran into a few problems with setting up homestead, but it was well worth it. Your Google skills definitely have to be on point.
-
-
agileMike over 4 yearsThis led me to the solution for my problem. I needed to copy the .env.example file to .env and configure my database settings. That cleared the 500 and Laravel told me to generate the app key and nicely provided a button on the page to do so.