Steven SullivanSteven Sullivan - 11th Jun 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 may look like this:

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 changing the user_ini.cache_ttl directive in the default php.ini file.

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).

 

Reference: http://php.net/manual/en/configuration.file.per-user.php

Leave a Reply

Your email address will not be published. Required fields are marked *