I use php_value
and php_flag
rules in .htaccess
such as:
php_value upload_max_filesize 100M
But this causes an error when the server is running in CGI mode instead of Apache mode, and instead I have to use php.ini rules such as:
upload_max_filesize = 100M
My code libraries needs to work for either mode, without manual changes for each server.
It took me a while to find a solution to allow both methods to be in place, and as it was hard to find I thought I'd post my solution here.