-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to access PHP error logs? #5
Comments
Can't you see these logs using the lando logs command? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues. |
This was a great reminder that we should document the easiest way to get PHP log output (per lando/docs#31). I took some of the advice from here, lando/lando#315, and lando/docs#31 to make a doc guide. When the next tagged Lando release comes out, it'll be available here: https://docs.lando.dev/guides/accessing-php-logs.html |
Going to mark this as something to consider in v4; note that I did try the OP's steps and had the same issue (my php.ini setting seemed to be ignored and I didn't get PHP log entries in /var/log). |
How can I access PHP error logs in Lando?
I've found several similar issues, but none of them allow you access to true error logs. At best they give you access to logs loosely related to PHP but are useless for resolving the cause of errors.
lando logs
? lando#315What I want is full access to error logs like you would be able to configure while hosting a site via localhost Apache and PHP.
Here's what I've attempted so far:
.lando.yml
(relevant pieces only)
Note that in the build process I am creating
/var/log/php_errors.log
.lando/php-conf/php.ini
Then I followed these steps:
lando rebuild
lando ssh
php -i | grep error
. Here I seeerror_log => /var/log/php_errors.log => /var/log/php_errors.log
. This looks correct.ls /var/log/
. Here I seephp_errors.log
.tail -f /var/log/php_errors.log
. I see nothing.tail
process.Am I missing something obvious? Wouldn't this be super useful for everyone? Thanks for any help.
The text was updated successfully, but these errors were encountered: