tyre europe cycle parts

Support / PHP / Changing PHP settings with .htaccess

Changing PHP settings with .htaccess

You can customize many of PHP’s default settings using a .htaccess file.

Place the file in the directory where you want the changes to take effect — they will apply to all files and subdirectories within it. The file should be named .htaccess. If it doesn’t already exist, you’ll need to create it manually, for example using the File Manager.

You can see a list of all PHP settings here: http://www.php.net/manual/en/ini.list.php

The settings you want to change just stand on a line in the .htaccess file. Some popular options are:

Hide error messages

php_flag display_errors off

Raise session lifetime (timeout)

php_value session.gc_maxlifetime 3600

Raise max upload size

php_value upload_max_filesize 512M 
php_value post_max_size 512M

Raise max execution time

php_value max_execution_time 600

Raise max input each

php_value max_input_vars 2000

Always disable populate raw post data

php_value always_populate_raw_post_data -1

Some settings can also be set directly in the PHP code with the ini_set() function. Details of settings, etc. can be found in the PHP manual: http://php.net/manual/en/ini.list.php

You can test if the changes are set correctly by looking in phpinfo(). Note this is the 'Local-value' column that applies.

Still can't find what you're looking for?

Contact Support
ellipse iconfooter back ground image
logo
Copyright © 2025 HostPepper. All Rights Reserved.