0

I want to set php_value (error_log) based on the host server. If it is a local server:

php_value error_log  ./PHP_errors.log

and if it is the remote server:

php_value error_log  /home/user_id/public_html/PHP_errors.log

I tried using

SetEnvIf Host "localhost"
php_value error_log  ./PHP_errors.log

but it returns error. How can I do that?

1 Answer 1

0

I don't think you can set this conditionally from within .htaccess, but there's an easy workaround. Make an auto-prepended PHP script and set the values from there, using PHP's ini_set function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.