Chat / support@radicenter.eu

PHP ini settings / modify settings howto

All users can change global PHP settings via .htaccess or by including ini_set() in their PHP conf file depending on server. We use suPHP and mod_PHP on our servers.

suPHP:
If your homepage resides on suPHP server – you can change/modify settings with ini_set():

ini_set('what_to_change', 0/1);

More info HERE

Apache mod PHP:
Modifying settings cia .htaccess file. If you want your settings to apply to every folder under your domain, create/move/modify your .htaccess file in root folder of your website (public_html)

Most often used modifications/examples:

max_execution_time This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 60 sec.

max_input_time This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. It is measured from the moment of receiving all data on the server to the start of script execution. The default setting is 60 sec.

memory_limit This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. The default setting is 48M.

upload_max_filesize The maximum size of an uploaded file.
When an integer is used, the value is measured in bytes. The default setting is 32M.

post_max_size Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. The default setting is 48M.

register_globals Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables. This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

Changing boolean type system settings in PHP thru .htaccess:
With directive php_flag.
Example:

php_flag register_globals Off
php_flag magic_quotes_gpc Off

Boolean type variables settings are 0 and 1 or on and off.
Other variables are set with option php_value.
Example:

php_value upload_max_filesize 20M

More info from here:
http://www.php.net/manual/en/ini.list.php

Comments are currently closed.

This website utilizes cookies and similar technologies for functionality and other purposes. Your use of this website constitutes your acceptance of cookies.
Ok, got it.