11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.it-ebooks.infoCHAPTER 2 • CONFIGURING YOUR ENVIRONMENT■ Note You can disable Apache’s broadcast of its server signature by setting ServerSignature to Off in thehttpd.conf file.Resource LimitsAlthough <strong>PHP</strong>’s resource-management capabilities were improved in version 5, you must still be carefulto ensure that scripts do not monopolize server resources as a result of either programmer- or userinitiatedactions. Three particular areas where such overconsumption is prevalent are script executiontime, script input processing time, and memory. Each can be controlled via the following threedirectives.max_execution_time = integerScope: <strong>PHP</strong>_INI_ALL; Default value: 30The max_execution_time parameter places an upper limit on the amount of time, in seconds, that a<strong>PHP</strong> script can execute. Setting this parameter to 0 disables any maximum limit. Note that any timeconsumed by an external program executed by <strong>PHP</strong> commands, such as exec() and system(), does notcount toward this limit.max_input_time = integerScope: <strong>PHP</strong>_INI_ALL; Default value: 60The max_input_time parameter places a limit on the amount of time, in seconds, that a <strong>PHP</strong> scriptdevotes to parsing request data. This parameter is particularly important when you upload large filesusing <strong>PHP</strong>’s file upload feature, which is discussed in Chapter 15.memory_limit = integerMScope: <strong>PHP</strong>_INI_ALL; Default value: 128MThe memory_limit parameter determines the maximum amount of memory, in megabytes, that canbe allocated to a <strong>PHP</strong> script.Data HandlingThe parameters introduced in this section affect the way that <strong>PHP</strong> handles external variables, thosevariables passed into the script via some outside source. GET, POST, cookies, the operating system, andthe server are all possible candidates for providing external data. Other parameters located in thissection determine <strong>PHP</strong>’s default character set, <strong>PHP</strong>’s default MIME type, and whether external files willbe automatically prepended or appended to <strong>PHP</strong>’s returned output.arg_separator.output = stringScope: <strong>PHP</strong>_INI_ALL; Default value: &amp;29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!