Separate php.ini file for each Apache virtual host?

Solution 1:

If you're using mod_php, you can override the values you wish in httpd.conf. There are these module directives:

php_value - PHP Value Modifier
php_flag - PHP Flag Modifier
php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin)

If not, your best shot is PHP FPM (google it).

Solution 2:

If you're using cgi (or fastcgi, or fpm, which is fastcgi too), you can use the .user.ini files.

Simply place a .user.ini file in your webroot directory with your php options, as follows:

memory_limit=256M
upload_max_filesize=200M
post_max_size=200M

And php will extend the main php.ini file with that options.