php.ini updating

I have updated my /etc/php.ini settings and would like to update all sites with the same, is there an easy way of doing this?

I tried using the solution offered in -

“Jamie tells me that one way to re-copy the php.ini file would be to change the PHP Execution Mode to something else, then change it back. You could do that from within the GUI, or using the command line.”

  • but this did not work on a test with one site, after changing the settings - diff /etc/php.ini /home/dummy/etc/php.ini - still showed a difference

I have about 70 sites installed, so doing it manually will take a while.



I found -,php_and_virtualmin - and used the command -

find /home -name php.ini | xargs sed -i “s/memory_limit =.*/memory_limit = 32M/”

Changing each variable in turn, but got an error message when using

find /home -name php.ini | xargs sed -i “s/date.timezone =.*/date.timezone = Europe/London/”
sed: -e expression #1, char 44: unknown option to `s’

Would this be the / in the Europe/London causing the problem?

find /home -name php.ini | xargs sed -i "s/date.timezone =.*/date.timezone = Europe\/London/"

(add \ before /London )