Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server I am trying to force adverts for free users. I can do it with a .htaccess file with this line "php_value auto_append_file '/var/www/vhosts/demoblog/demoblog.tk/httpdocs/test_ad.php'" but when I try to add it to the virtualHost it does nothing. I cannot see anything in the apache error log, and yes I do restart apache.

Any help would be great.

share|improve this question

In order to use the php_value directive you must be running PHP in Apache as a module. You also need to set AllowOverride Options and AllowOverride All, otherwise the directive will be ignored.

See How to change configuration settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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