Using php_flag or php_value in .htaccess files
Some PHP scripts suggest using "
php_value" or "
php_flag" commands in .htaccess files, as in this example:
php_value include_path ".:/usr/local/lib/php" php_flag display_errors Off php_value upload_max_filesize 2M
However, our servers run PHP in "CGI mode" as recommended by the PHP developers (not as an Apache module), so you can't use "php_value" or "php_flag" commands in .htaccess files. If you try to do so, you'll see an "internal server error" message.
You can modify your
php.ini file to get the same effect, though. In fact, modifying
php.ini is actually more flexible than using php_value or php_flag: there are many things you can't override using .htaccess files, but you can override almost any PHP setting in the
See our PHP support page for instructions on modifying
php.ini. To get the same effect as the .htaccess lines above, you would simply add these lines to your custom
include_path = ".:/usr/local/lib/php" display_errors = Off upload_max_filesize = 2M