Knowledge Base

Using php.ini directives

PHP allows you to control many aspects of your web site by using directives in php.ini files. Learn about some of these directives here.

These articles assume that you have already set up a custom php.ini file. If you have not already done this, please read this article first.
PHP error messages

You can control whether or not PHP displays error messages to web site visitors by using the display_errors directive in a custom php.ini file. Learn how here.

PHP error logging

You can use the log_errors and error_log directives in a custom php.ini file to configure PHP error logging, and this article shows you how.

PHP time zones

By default, A2 Hosting's servers are set to use US Eastern Standard Time. Learn how to change the PHP time zone setting for your web site here.

PHP maximum execution time

By default, the maximum execution time for PHP scripts is set to 30 seconds, but you can change this interval by using the max_execution_time directive.

PHP allow_url_fopen directive

You can enable and disable the allow_url_fopen directive in a custom php.ini file.

PHP register_globals directive

You can enable and disable the register_globals directive in a custom php.ini file. This article only applies to PHP 5.3 and earlier versions.

PHP magic quotes directive

You can enable and disable the magic quotes directive in a custom php.ini file. This article only applies to PHP 5.3 and earlier versions.

PHP maximum upload file size

By default, the maximum upload file size for PHP scripts is set to 128 megabytes, but you can change this amount by using the upload_max_filesize and post_max_size directives.

PHP script memory limit

By default, the memory limit for PHP scripts is set to 128 megabytes, but you can change this value by using the memory_limit directive.

PHP max_input_vars directive

By default, the maximum number of input variables for PHP scripts is set to 1000, but you can change this amount by using the max_input_vars directive.

PHP expose_php directive

You can use the expose_php directive in a custom php.ini file to control whether or not PHP sends version information in the HTTP headers. Learn more here.

PHP output_buffering directive

Learn how the output_buffering directive works, and how to set it in a custom php.ini file.

PHP disable_functions directive

You can disable specific PHP functions by using the disable_functions directive in a custom php.ini file. This article shows you how.