: PHPOverridePhpIni

Welcome :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Overriding System php.ini


Sometimes, your site may require a local adjustment to the default or system-wide php.ini values. This might be to increase the maximum file size allowed to upload through a form, or some other setting.

PHP 4 / Default

This is the default for all accounts. You can use your .htaccess file to override certain php.ini values.

Use the format:
php_value PHP_VARIABLE PHP_VALUE

Most will settings will be identified with php_value, though binary settings (on/off) will use php_flag:
php_value max_upload_filesize 10M
php_flag register_globals off



PHP5 / suPHP

If you enable PHP 5 through cPanel, then you will need to create a custom php.ini and place it in your home directory.
.htaccess should contain something like this:
SuPHP_ConfigPath /home/username/php.ini

(php.ini should be placed in your home directory, and not in your public_html folder)

The directives in your php.ini should look like this:
PHP_VARIABLE = PHP_VALUE
Example:
upload_max_filesize = 10M



PHP 5 / FastCGI

Please use these instructions if you are using FastCGI.


Back to PHP
Back to Main

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.0629 seconds