There are two settings you can put into a .htaccess file that allow you to change certain PHP INI settings: |
php_value - Used to set a string PHP INI directive. For example: '/path/to/mydir/'
php_flag - Used to set a boolean PHP INI directive. For example: 'On' or 'Off'
Some examples are shown below:
php_value include_path /usr/local/lib/php
- Change the include path
php_flag register_globals Off
- Switch register_globlals off
php_value upload_max_filesize 20M
php_value post_max_size 20M
- Change the maximum upload size to 20MB
To change PHP 5 INI settings, use php5_flag and php5_value. The following example changes the session timeout to 1000 seconds. You will need to replace the session.save_path to a directory in your webspace with "777" permissions:
php_value session.cache_expire 1000
php_value session.gc_maxlifetime 1000
php_value session.save_path /path/to/temp/directory