]> git.pld-linux.org Git - packages/php.git/blame - php-ini.patch
- updated
[packages/php.git] / php-ini.patch
CommitLineData
a00e0eb8
AM
1diff -urN php-5.0.1.org/php.ini-dist php-5.0.1/php.ini-dist
2--- php-5.0.1.org/php.ini-dist 2004-08-13 13:28:45.800911928 +0200
3+++ php-5.0.1/php.ini-dist 2004-08-13 13:31:28.844125592 +0200
917119c9 4@@ -3,13 +3,18 @@
4342041a
JB
5 ;;;;;;;;;;;
6 ; WARNING ;
7 ;;;;;;;;;;;
8-; This is the default settings file for new PHP installations.
9-; By default, PHP installs itself with a configuration suitable for
10-; development purposes, and *NOT* for production purposes.
11-; For several security-oriented considerations that should be taken
12-; before going online with your site, please consult php.ini-recommended
13-; and http://php.net/manual/en/security.php.
917119c9 14-
4342041a
JB
15+; This is the default settings file for new PHP installations from
16+; PLD Linux Distribution.
17+; It's based mainly on php.ini-dist, but with some changes made with
18+; security in mind (see below, consult also
19+; http://php.net/manual/en/security.php).
20+;
917119c9
AM
21+; Please note, that in PLD installations /etc/php/php.ini file
22+; contains global settings for all SAPIs (cgi, cli, apache...),
4342041a
JB
23+; and after reading this file, SAPI-specific file (/etc/php/php-cgi.ini,
24+; /etc/php/php-cli.ini, /etc/php/php-apache.ini...) is INCLUDED
917119c9
AM
25+; (so you don't have to duplicate whole large file to override only
26+; few options)
4342041a 27
a00e0eb8
AM
28 ;;;;;;;;;;;;;;;;;;;
29 ; About php.ini ;
30@@ -59,10 +64,72 @@
4342041a 31 ;;;;;;;;;;;;;;;;;;;
917119c9 32 ; About this file ;
a00e0eb8 33 ;;;;;;;;;;;;;;;;;;;
4342041a
JB
34-; All the values in the php.ini-dist file correspond to the builtin
35-; defaults (that is, if no php.ini is used, or if you delete these lines,
36-; the builtin defaults will be identical).
a00e0eb8
AM
37-
38+; If you use constants in your value, and these constants belong to a
39+; dynamically loaded extension (either a PHP extension or a Zend extension),
40+; you may only use these constants *after* the line that loads the extension.
41+
42+
4342041a
JB
43+; Below is the list of settings changed from default as specified in
44+; php.ini-recommended. These settings make PHP more secure and encourage
45+; cleaner coding.
46+; The price is that with these settings, PHP may be incompatible with some old
47+; or bad-written applications, and sometimes, more difficult to develop with.
48+; Using this settings is warmly recommended for production sites. As all of
49+; the changes from the standard settings are thoroughly documented, you can
50+; go over each one, and decide whether you want to use it or not.
51+;
52+; - register_globals = Off [Security, Performance]
53+; Global variables are no longer registered for input data (POST, GET, cookies,
54+; environment and other server variables). Instead of using $foo, you must use
55+; you can use $_REQUEST["foo"] (includes any variable that arrives through the
56+; request, namely, POST, GET and cookie variables), or use one of the specific
57+; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
58+; on where the input originates. Also, you can look at the
59+; import_request_variables() function.
60+; Note that register_globals = Off is the default setting since PHP 4.2.0.
61+; - display_errors = Off [Security]
62+; With this directive set to off, errors that occur during the execution of
63+; scripts will no longer be displayed as a part of the script output, and thus,
64+; will no longer be exposed to remote users. With some errors, the error message
65+; content may expose information about your script, web server, or database
66+; server that may be exploitable for hacking. Production sites should have this
67+; directive set to off.
68+; - log_errors = On [Security]
69+; This directive complements the above one. Any errors that occur during the
70+; execution of your script will be logged (typically, to your server's error log,
71+; but can be configured in several ways). Along with setting display_errors to off,
72+; this setup gives you the ability to fully understand what may have gone wrong,
73+; without exposing any sensitive information to remote users.
74+; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
75+; By default, PHP surpresses errors of type E_NOTICE. These error messages
76+; are emitted for non-critical errors, but that could be a symptom of a bigger
77+; problem. Most notably, this will cause error messages about the use
78+; of uninitialized variables to be displayed.
79+
80+; For completeness, below is list of the rest of changes recommended for
81+; performance, but NOT applied in default php.ini in PLD (since they are
82+; not needed for security or may cause problems with some applications
83+; more likely than above).
a00e0eb8 84+
4342041a
JB
85+; - output_buffering = 4096 [Performance]
86+; Set a 4KB output buffer. Enabling output buffering typically results in less
87+; writes, and sometimes less packets sent on the wire, which can often lead to
88+; better performance. The gain this directive actually yields greatly depends
89+; on which Web server you're working with, and what kind of scripts you're using.
90+; - register_argc_argv = Off [Performance]
91+; Disables registration of the somewhat redundant $argv and $argc global
92+; variables.
93+; - magic_quotes_gpc = Off [Performance]
94+; Input data is no longer escaped with slashes so that it can be sent into
95+; SQL databases without further manipulation. Instead, you should use the
96+; function addslashes() on each input element you wish to send to a database.
97+; - variables_order = "GPCS" [Performance]
98+; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access
99+; environment variables, you can use getenv() instead.
100+; - allow_call_time_pass_reference = Off [Code cleanliness]
101+; It's not possible to decide to force a variable to be passed by reference
102+; when calling a function. The PHP 4 style to do this is by making the
103+; function require the relevant argument by reference.
917119c9 104
4342041a 105 ;;;;;;;;;;;;;;;;;;;;
a00e0eb8
AM
106 ; Language Options ;
107@@ -86,7 +153,7 @@
9fab2fdf
JK
108 asp_tags = Off
109
110 ; The number of significant digits displayed in floating point numbers.
cc1337ae
JK
111-precision = 12
112+precision = 14
9fab2fdf
JK
113
114 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
4342041a 115 y2k_compliance = On
a00e0eb8 116@@ -285,14 +352,14 @@
4342041a 117 ;
917119c9 118 ; - Show all errors except for notices and coding standards warnings
0ced536a 119 ;
917119c9 120-error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
4342041a
JB
121+error_reporting = E_ALL
122
123 ; Print out errors (as a part of the output). For production web sites,
124 ; you're strongly encouraged to turn this feature off, and use error logging
125 ; instead (see below). Keeping display_errors enabled on a production web site
126 ; may reveal security information to end users, such as file paths on your Web
127 ; server, your database schema or other information.
128-display_errors = On
129+display_errors = Off
130
131 ; Even when display_errors is on, errors that occur during PHP's startup
132 ; sequence are not displayed. It's strongly recommended to keep
a00e0eb8 133@@ -447,7 +514,7 @@
78b7386f
GS
134 user_dir =
135
136 ; Directory in which the loadable extensions (modules) reside.
a224c566
AG
137-extension_dir = "./"
138+extension_dir = "/usr/lib/php"
78b7386f
GS
139
140 ; Whether or not to enable the dl() function. The dl() function does NOT work
141 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
This page took 0.04278 seconds and 4 git commands to generate.