Rather than put the absolute path to an error_log in my .htaccess, I would like to find a way to specify it relative to the .htaccess file (or similar):
php_value error_log %{DOCUMENT_ROOT}/libs/log/error/PHP_errors.log
It would be something like I would want to do, but this doesn't seem to work. If I specify the absolute, it does work.
You can set it to ./path/error.log
.
When you have access to the server-config you can add the Line:
# set this to your document-root path
Define DOCROOT "d:\htdocs"
and in your htaccess you can write:
php_value error_log ${DOCROOT}/libs/log/error/PHP_errors.log
With this define you can even replace all other places where your document root is use e.g.
DocumentRoot "${DOCROOT}"
@see: https://httpd.apache.org/docs/2.4/de/mod/core.html#define
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With