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.
What 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)
config:
framework: drupal7
php: '7.1'
via: apache
database: mysql
webroot: docroot
drush: ^8
xdebug: false
config:
# Custom PHP config overrides.
php: lando/php-conf/php.ini
services:
appserver:
build_as_root:
- touch /var/log/php_errors.log
Note that in the build process I am creating /var/log/php_errors.log.
lando/php-conf/php.ini
error_log = /var/log/php_errors.log
Then I followed these steps:
lando rebuild
lando ssh
php -i | grep error. Here I see error_log => /var/log/php_errors.log => /var/log/php_errors.log. This looks correct.
ls /var/log/. Here I see php_errors.log.
tail -f /var/log/php_errors.log. I see nothing.
- I trigger a PHP error. I still see nothing in the
tail process.
Am I missing something obvious? Wouldn't this be super useful for everyone? Thanks for any help.
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 rebuildlando sshphp -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.tailprocess.Am I missing something obvious? Wouldn't this be super useful for everyone? Thanks for any help.