Server Fault is a question and answer site for system and network administrators. 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

On each virtualhost, I have a custom php.ini:

PHPINIDir /var/www/site1/php.ini

What I currently do is copy the original /etc/php.ini to /var/www/site1/php.ini then do the modifications. But it's a headache, how can I just enter only the values which I want to change so the content of /var/www/site1/php.ini for example will just override the default php.ini?

memory_limit = 256M
share|improve this question

migrated from Jun 23 '12 at 19:11

This question came from our site for professional and enthusiast programmers.

It seems duplicate Q, which is also answered here:… – Dexter Huinda Jun 23 '12 at 20:14
up vote 2 down vote accepted

You can use php_value to override specific values, e.g. php_value memory_limit 256M.

share|improve this answer
I would be putting that in my virtualhost file? – Michelle Jun 23 '12 at 19:14
Yes, you can put it in the vhost or even inside a .htaccess – ThiefMaster Jun 23 '12 at 20:27
<!--meow--> thanks! – Michelle Jun 23 '12 at 21:52

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.