Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I want to change the location of the default log file, for example in php.ini:
error_log = /etc/var/php_error.log
Can I make this path absolute? And do I need to restart apache after doing this? Thanks!
/etc/var/php_error.log
When you path start with / (for linux), that means its a absolute path. and as you making changes in configuration file of PHP, apache needs to be restarted when PHP is running as an Apache module.
/
Add a comment
You can change it at runtime in your application by using:
<?php ini_set('error_log', $yourAbsolutePath);
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
/etc/var/php_error.logis already an absolute path.