Php.Ini File Configuration

The PHP configuration file, php.ini, is the in conclusion together with nearly immediate way to impact PHP's functionality. The php.ini file is read each fourth dimension PHP is initialized.in other words, whenever httpd is restarted for the module version or amongst each script execution for the CGI version. If your alter isn’t showing up, cry back to halt together with restart httpd. If it even together with hence isn’t showing up, usage phpinfo() to cheque the path to php.ini. The configuration file is good commented together with thorough. Keys are instance sensitive, keyword values are not; whitespace, together with lines starting fourth dimension amongst semicolons are ignored. Booleans tin hold upward represented past times 1/0, Yes/No, On/Off, or True/False. The default values inward php.ini-dist volition number inward a reasonable PHP installation that tin hold upward tweaked later. Here nosotros are explaining the of import settings inward php.ini which you lot may demand for your PHP Parser.
 is the in conclusion together with nearly immediate way to impact PHP PHP.INI file Configuration


short_open_tag = Off

Short opened upward tags await similar this: <? ?>. This selection must hold upward laid to Off if you lot desire to usage XML functions.

safe_mode = Off

If this is laid to On, you lot belike compiled PHP amongst the --enable-safe-mode flag. Safe way is nearly relevant to CGI use. See the explanation inward the department "CGI compile-time options". before inward this chapter.

safe_mode_exec_dir = [DIR]

This selection is relevant exclusively if security way is on; it tin also hold upward laid amongst the --with-exec-dir flag during the Unix construct process. PHP inward security way exclusively executes external binaries out of this directory. The default is /usr/local/bin. This has cipher to create amongst serving upward a normal PHP/HTML Web page.

safe_mode_allowed_env_vars = [PHP_]

This selection sets which surroundings variables users tin alter inward security mode. The default is exclusively those variables prepended amongst "PHP_". If this directive is empty, nearly variables are alterable.

safe_mode_protected_env_vars = [LD_LIBRARY_PATH]

This selection sets which surroundings variables users can't alter inward security mode, fifty-fifty if safe_mode_allowed_env_vars is laid permissively.

disable_functions = [function1, function2...]

A welcome improver to PHP4 configuration together with ane perpetuated inward PHP5 is the mightiness to disable selected functions for security reasons. Previously, this necessitated hand-editing the C code from which PHP was made. Filesystem, system, together with network functions should belike hold upward the inaugural of all to larn because allowing the capability to write files together with alter the organization over HTTP is never such a security idea.

max_execution_time = 30

The component set_time_limit() won.t piece of job inward security mode, together with hence this is the principal way to brand a script fourth dimension out inward security mode. In Windows, you lot convey to abort based on maximum retentivity consumed rather than time. You tin also usage the Apache timeout setting to timeout if you lot usage Apache, but that volition apply to non-PHP files on the site too.

error_reporting = E_ALL & E_NOTICE

The default value is E_ALL & E_NOTICE, all errors except notices. Development servers should hold upward laid to at to the lowest degree the default; exclusively production servers should fifty-fifty catch a lesser value

error_prepend_string = [""]

With its bookend, error_append_string, this setting allows you lot to brand fault messages a dissimilar color than other text, or what you lot have.

warn_plus_overloading = Off

This setting issues a alarm if the + operator is used amongst strings, equally inward a cast value.

variables_order = EGPCS

This configuration setting supersedes gpc_order. Both are instantly deprecated along amongst register_globals. It sets the gild of the dissimilar variables: Environment, GET, POST, COOKIE, together with SERVER (aka Built-in).

You tin alter this gild around. Variables volition hold upward overwritten successively inward left-to-right order, amongst the rightmost ane winning the mitt every time. This way if you lot left the default setting together with happened to usage the same lift for an surroundings variable, a POST variable, together with a COOKIE variable, the COOKIE variable would ain that lift at the terminate of the process. In existent life, this doesn't occur much.

register_globals = Off

This setting allows you lot to determine whether you lot wishing to register EGPCS variables equally global. This is instantly deprecated, together with equally of PHP4.2, this flag is laid to Off past times default. Use superglobal arrays instead. All the major code listings inward this mass usage superglobal arrays.

gpc_order = GPC

This setting has been GPC Deprecated.

magic_quotes_gpc = On

This setting escapes quotes inward incoming GET/POST/COOKIE data. If you lot usage a lot of forms which perhaps submit to themselves or other forms together with display cast values, you lot may demand to laid this directive to On or gear upward to usage addslashes() on string-type data.

magic_quotes_runtime = Off

This setting escapes quotes inward incoming database together with text strings. Remember that SQL adds slashes to unmarried quotes together with apostrophes when storing strings together with does non strip them off when returning them. If this setting is Off, you lot volition demand to usage stripslashes() when outputting whatever type of string information from a SQL database. If magic_quotes_sybase is laid to On, this must hold upward Off.

magic_quotes_sybase = Off

This setting escapes unmarried quotes inward incoming database together with text strings amongst Sybase-style unmarried quotes rather than backslashes. If magic_quotes_runtime is laid to On, this must hold upward Off.

auto-prepend-file = [path/to/file]

If a path is specified here, PHP must automatically include() it at the starting fourth dimension of every PHP file. Include path restrictions create apply.

auto-append-file = [path/to/file]

If a path is specified here, PHP must automatically include() it at the terminate of every PHP file.unless you lot escape past times using the exit() function. Include path restrictions create apply.

include_path = [DIR]

If you lot laid this value, you lot volition exclusively hold upward allowed to include or require files from these directories. The include directory is mostly nether your document root; this is mandatory if you.re running inward security mode. Set this to . inward gild to include files from the same directory your script is in. Multiple directories are separated past times colons: .:/usr/local/apache/htdocs:/usr/local/lib.

doc_root = [DIR]

If you.re using Apache, you.ve already laid a document root for this server or virtual host inward httpd.conf. Set this value hither if you.re using security way or if you lot desire to enable PHP exclusively on a part of your site (for example, exclusively inward ane subdirectory of your Web root).

file_uploads = [on/off]

Turn on this flag if you lot volition upload files using PHP script.

upload_tmp_dir = [DIR]

Do non uncomment this describe of piece of job unless you lot sympathise the implications of HTTP uploads!

session.save-handler = files

Except inward rare circumstances, you lot volition non desire to alter this setting. So don't touching it.

ignore_user_abort = [On/Off]

This setting controls what happens if a site visitor clicks the browser.s Stop button. The default is On, which way that the script continues to run to completion or timeout. If the setting is changed to Off, the script volition abort. This setting exclusively industrial plant inward module mode, non CGI.

mysql.default_host = hostname

The default server host to usage when connecting to the database server if no other host is specified.

mysql.default_user = username

The default user lift to usage when connecting to the database server if no other lift is specified.

mysql.default_password = password

The default password to usage when connecting to the database server if no other password is specified.



Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.