0

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!

2
  • 3
    Yes, you must restart server after changing path. Commented Jun 3, 2015 at 12:12
  • 1
    /etc/var/php_error.log is already an absolute path. Commented Jun 3, 2015 at 12:17

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

You can change it at runtime in your application by using:

<?php
ini_set('error_log', $yourAbsolutePath);

Comments

Your Answer

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.

Ask question

Explore related questions

See similar questions with these tags.