1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Changing server configuration (old hosting package)
We never modify php.ini, my.ini or httpd.conf files on demand.
However, you may choose to set various parameters using two alternative methods.
Steps to follow
Either: add lines in your PHP code
<? ini_set('configuration parameter to change', 'on or off'); ?>
or <? ini_set('configuration parameter to change', 'new value to set'); ?>
For example:
<? ini_set('display_errors', 'off'); ?>
// disable error display
Or: create an .htaccess file (or .user.ini for hostings on the new console)
php_flag "configuration parameter to change" "on or off"
or php_value "configuration parameter to change" "new value to set"
For example:
php_flag display_errors "off "
# disable error display
php_flag "allow_url_fopen " "On"
php_flag "allow_url_include" "On"
# enable fopen, fsockopen, includes, file_get_contents, simplexml_load_file, etc.
# provides a solution to issues such as
# URL file-access is disabled in the server configuration
# fatal error: main() [function.require]
# failed to open stream
# get_headers(), file get content, etc.
php_flag detect_unicode "off"
# set the variable detect_unicode to Off
php_flag short_open_tag "off"
# disable the use of short tags (<? ?>) in order to use PHP with XML
php_value register_globals "0"
# disable Register Globals, enabled by default
php_value magic_quotes_gpc "1"
# enable magic quotes for GPC operations (but read https://www.php.net/manual/en/security.magicquotes.php)
AllowOverride None
# change AllowOverride, set to ALL by default
Illustrated steps
Creating an .htaccess file and inserting a command
More information
You will find all of the available parameters at http://php.net/ini_set
You are allowed to change the flags of variables marked PHP_INI_PERDIR or PHP_INI_ALL at http://www.php.net/manual/en/ini.php#ini.list
The memory_limit and max_execution_time limits are set within the Apache configuration and therefore cannot be changed.