Common PHP.ini directives list for Apache htaccess files

Maximum Execution Time and Maximum Input Time

php_value max_execution_time 300
php_value max_input_time 300

Max Upload file size and Max POST data size

php_value upload_max_filesize 20M
php_value post_max_size 21M

Output buffering toggle

php_value output_buffering on
# OR
php_value output_buffering 16384

Expose PHP signature – toggle

php_value expose_php on

Maximum Input variables

php_value max_input_vars 1500

Maximum Memory Limit for PHP

php_value memory_limit 1256M

Magic Quotes toggle

php_value magic_quotes_gpc on

Register Global Variables – useless now

register_globals = off  
#removed as of php 5.4

Allow remote URL in fopen

php_value allow_url_fopen on

Max Execution Time for php scripts

php_value max_execution_time 1000

Set Timezone for PHP datetime functions

php_value date.timezone "Europe/Paris"
php_value date.timezone "Asia/Kolkata"

More at: http://www.php.net/manual/en/timezones.php

Error Logging Settings

php_value log_errors On
php_value error_log /path/filename
php_value display_errors on
php_value display_startup_errors on

Complete List of INI directives:

http://www.php.net/manual/en/ini.list.php


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *