Steven SullivanSteven Sullivan - 11th June 2013

Fast-cgi .user.ini files work like .htaccess files.

From PHP version 5.3.0 you can use .user.ini instead of .htaccess files. Fast-CGI reads this file by default every 300 seconds (5 minutes).

Fast-cgi .user.ini files are just like .htaccess files

For example a default .htaccess file:

php_value post_max_size 250M
php_value upload_max_filesize 250M
php_value memory_limit 64M
php_value max_execution_time 300

This becomes the following for a .user.ini file:

post_max_size = 250M
upload_max_filesize = 250M
memory_limit = 64M
max_execution_time = 300

You can also change the default time that the .user.ini file is read by creating a user_ini.cache_ttl inside the same directory and/or top level directory.

user_ini.filename sets the name of the file PHP looks for in each directory; if set to an empty string, PHP doesn’t scan at all. The default is .user.ini.

user_ini.cache_ttl controls how often user INI files are re-read. The default is 300 seconds (5 minutes).