Thursday, September 5, 2013

Set php.ini file Values Using .htaccess

9/05/2013


If are using PHP as an apache module, PHP allows us to modify php.ini using Apache Configuration. This can be done using the following directives:

php_value name value 
Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a previously set value use none as the value.

php_flag name on|off
Used to set a boolean configuration directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives.

php_admin_value name value
Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or ini_set(). 

php_admin_flag name on|off 
Used to set a boolean configuration directive. This can not be used in .htaccess files. Any directive type set with php_admin_flag can not be overridden by .htaccess or ini_set().

In .htaccess File put following code

#htacces code format
php_value setting_name setting_value

#example
php_value  upload_max_filesize  7M


Of course you could simply place these in the .htaccess
It's actually very easy

helpful? Share this

The Editorial Team of 4everTutorials consists of a group of PHP Professionals.

0 comments:

 

© 2014 4everTutorials. All rights resevered.

Back To Top