Adjustment of parameters PHP in php.ini
php has set of the adjustments described in a file php.ini. This file should be accessible in system ways of search that php could use these adjustments. Usually for this purpose it is enough to store{keep} this file in the same catalogue where it is located itself php but if php it is configured for job as the module of the web-server this file is necessary for copying in the catalogue obviously accessible in system ways of search. See section of installation php for reception of more detailed instructions.
Here key parameters php, divided{shared} on categories are considered{examined}. The list of parameters basically corresponds{meets} to the version php 4.0.6, however only key parameters here are considered{examined}. The full list of parameters with comments on each of them can be seen directly in php.ini, and also in corresponding section php manual.
Values of the parameters having variants "yes / is not present" can be the following:
YES - 1, on, true or yes
NO - 0, off, false or no
short_open_tag
Inclusion of support of the reduced variant php tegov. If this option is switched - off, php the code will be distinguished only inside tegov. If it is switched on - that is authorized use tegov. The good form considers to not use the reduced recording php tegov.
asp_tags
Inclusion of support asp tegov <% of %> in quality php tegov.
output_buffering
Inclusion buferizirovannogo a conclusion php. Use buferizirovannogo a conclusion will allow you to use, for example, any functions operating with http header'ami (header (), setcookie ()) in any place of your script, not caring not deducing{removing} anything before. You can operate buferizirovannym a conclusion and from your scripts (see section output control functions in php manual). Remember, that at the switched on buffering a conclusion the result of job of a script will be returned to a browser only after job of a script that can lead to to slower job of a site will be finished.
safe_mode
Inclusion of a safe operating mode php. The safe mode forbids to scripts to make any actions which are unsafe for the server on which works php. very in detail safe operating mode php is considered{examined} in php manual.
max_execution_time
The maximal operating time php a script (in seconds). After this time job of a script will be compulsorily completed and given a corresponding mistake. Allows to avoid problems with "gone in cycles" scripts.
memory_limit
The maximal memory size which can be selected for needs of a script. Also allows to avoid problems with "gone in cycles" scripts.
error_reporting
Mask for error messages which should be generated php. It is set as logic expression with use of a set of the predetermined constants describing various types of mistakes. The list of these constants, and also it is possible to find rules of the task of expressions in php.ini.
display_errors
Defines{Determines}, whether it is necessary to display error messages. Usually this option is included during a spelling php scripts to have an opportunity to see error messages, and on real servers on the Internet she is switched usually off for safety reasons.
log_errors
If this option all mistakes will enter the name in log a file determined by the following option is switched on.
error_log
Way and name of a file where all error messages will enter the name, generated php. For systems of mistakes supporting system magazine it is possible to establish value of this parameter equal syslog to redirect all error messages there.
track_errors
If this option the text of last mistake will be always accessible from a variable $php_errormsg is switched on.
register_globals
This parameter defines{determines}, whether will be so-called egpcs variables (environment, get, post, cookies, session) are accessible as global variables php. If this parameter is resolved{allowed}, variables access to these variables will be carried out also, as well as to any other global variables php:
echo " the Version http the report: ". $server_protocol;
echo " Parameter query string: ". $param1;
echo " the Element of the form: ". $txtfirstname;
echo " mine cookie: ". $mycookie;
echo " my sessional variables: ". $mysessionvar;
Or the same, but with the switched - off parameter:
echo " the Version http the report: ". $http_env_vars [' server_protocol '];
echo " Parameter query string: ". $http_get_vars [' param1 '];
echo " the Element of the form: ". $http_post_vars [' txtfirstname '];
echo " mine cookie: ". $http_cookie_vars [' mycookie '];
echo " my sessional variables: ". $http_session_vars [' mysessionvar '];
It is at first sight less convenient, but disconnect of this parameter has also the advantages:
php starts to work little bit faster since additional time for creation of set of variables is not spent.
There is no risk of that any two variables will have identical names that will lead to to occurrence of mistakes in job of a script which it will be very difficult to catch valid them neochevidnosti.
variables_order
This parameter is used together with the previous parameter and defines{determines}, in what sequence registration global egpcs variables is made. For example, at a default value (egpcs) the variables transferred{handed} through get will be replaced with the variables transferred{handed} through post and having the same name. post-variable (and also environment and get variables) can be in turn replaced with values cookies with the same names, etc.
magic_quotes_gpc
Inclusion of this parameter will lead to to that all data acting on the part of the client (through get, post or cookie) will be processed: all inverted commas (' and ") in them will be replaced accordingly with a combination ' or ". On the one hand it is very convenient, if is planned to insert these data into the lines transmitted, for example, sql to the server, for example. But on the other hand it can lead to to mess, therefore usually it is more reliable to use for this purpose of function addslashes () and stripslashes ().
magic_quotes_runtime
The given parameter is similar previous except that influences the data acting from external sources, located on the party of the server (for example, the data acting from sql of the server or results of job of external programs).
magic_quotes_sybase
Inclusion of this option will lead to to that unary inverted commas (will be doubled). It is necessary for the some people sql servers which support only such way of an insert of inverted commas at lines (interbase, ms sql, sybase and some other).
auto_prepend_file
Allows to set a way and a name of a file which will be automatically added in the beginning of everyone php a script. It is used only if has nonempty value.
auto_append_file
The same, that the previous parameter, but addition of contents of a file is made in the end of everyone php a script.
extension_dir
Way to the catalogue where modules php lay. Usually it is subdirectory extensions in php root.

|