]> git.pld-linux.org Git - packages/php.git/blame - php-ini.patch
- cosmetics
[packages/php.git] / php-ini.patch
CommitLineData
d51aa947
ER
1--- php-5.2.0/php.ini 2006-11-03 01:27:56.372110952 +0200
2+++ php-5.2.0/php.ini 2006-11-03 01:30:12.215164639 +0200
917119c9 3@@ -3,13 +3,18 @@
4342041a
JB
4 ;;;;;;;;;;;
5 ; WARNING ;
6 ;;;;;;;;;;;
7-; This is the default settings file for new PHP installations.
8-; By default, PHP installs itself with a configuration suitable for
9-; development purposes, and *NOT* for production purposes.
10-; For several security-oriented considerations that should be taken
11-; before going online with your site, please consult php.ini-recommended
12-; and http://php.net/manual/en/security.php.
917119c9 13-
4342041a
JB
14+; This is the default settings file for new PHP installations from
15+; PLD Linux Distribution.
16+; It's based mainly on php.ini-dist, but with some changes made with
17+; security in mind (see below, consult also
18+; http://php.net/manual/en/security.php).
19+;
917119c9
AM
20+; Please note, that in PLD installations /etc/php/php.ini file
21+; contains global settings for all SAPIs (cgi, cli, apache...),
4342041a
JB
22+; and after reading this file, SAPI-specific file (/etc/php/php-cgi.ini,
23+; /etc/php/php-cli.ini, /etc/php/php-apache.ini...) is INCLUDED
917119c9
AM
24+; (so you don't have to duplicate whole large file to override only
25+; few options)
4342041a 26
a00e0eb8
AM
27 ;;;;;;;;;;;;;;;;;;;
28 ; About php.ini ;
c5eb76fc 29@@ -60,9 +65,71 @@
917119c9 30 ; About this file ;
a00e0eb8 31 ;;;;;;;;;;;;;;;;;;;
4342041a
JB
32-; All the values in the php.ini-dist file correspond to the builtin
33-; defaults (that is, if no php.ini is used, or if you delete these lines,
34-; the builtin defaults will be identical).
a00e0eb8
AM
35+; If you use constants in your value, and these constants belong to a
36+; dynamically loaded extension (either a PHP extension or a Zend extension),
37+; you may only use these constants *after* the line that loads the extension.
c5eb76fc 38
62277197 39
4342041a
JB
40+; Below is the list of settings changed from default as specified in
41+; php.ini-recommended. These settings make PHP more secure and encourage
42+; cleaner coding.
43+; The price is that with these settings, PHP may be incompatible with some old
44+; or bad-written applications, and sometimes, more difficult to develop with.
45+; Using this settings is warmly recommended for production sites. As all of
46+; the changes from the standard settings are thoroughly documented, you can
47+; go over each one, and decide whether you want to use it or not.
48+;
49+; - register_globals = Off [Security, Performance]
50+; Global variables are no longer registered for input data (POST, GET, cookies,
51+; environment and other server variables). Instead of using $foo, you must use
52+; you can use $_REQUEST["foo"] (includes any variable that arrives through the
53+; request, namely, POST, GET and cookie variables), or use one of the specific
54+; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
55+; on where the input originates. Also, you can look at the
56+; import_request_variables() function.
57+; Note that register_globals = Off is the default setting since PHP 4.2.0.
58+; - display_errors = Off [Security]
59+; With this directive set to off, errors that occur during the execution of
60+; scripts will no longer be displayed as a part of the script output, and thus,
61+; will no longer be exposed to remote users. With some errors, the error message
62+; content may expose information about your script, web server, or database
63+; server that may be exploitable for hacking. Production sites should have this
64+; directive set to off.
65+; - log_errors = On [Security]
66+; This directive complements the above one. Any errors that occur during the
67+; execution of your script will be logged (typically, to your server's error log,
68+; but can be configured in several ways). Along with setting display_errors to off,
69+; this setup gives you the ability to fully understand what may have gone wrong,
70+; without exposing any sensitive information to remote users.
71+; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
72+; By default, PHP surpresses errors of type E_NOTICE. These error messages
73+; are emitted for non-critical errors, but that could be a symptom of a bigger
74+; problem. Most notably, this will cause error messages about the use
75+; of uninitialized variables to be displayed.
20e4fbdf
ER
76+; - register_argc_argv = Off [Performance]
77+; Disables registration of the somewhat redundant $argv and $argc global
78+; variables.
79+; - magic_quotes_gpc = Off [Performance]
80+; Input data is no longer escaped with slashes so that it can be sent into
81+; SQL databases without further manipulation. Instead, you should use the
82+; function addslashes() on each input element you wish to send to a database.
83+; - variables_order = "GPCS" [Performance]
84+; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access
85+; environment variables, you can use getenv() instead.
4342041a
JB
86+
87+; For completeness, below is list of the rest of changes recommended for
88+; performance, but NOT applied in default php.ini in PLD (since they are
89+; not needed for security or may cause problems with some applications
90+; more likely than above).
ff83cd8b 91+
4342041a
JB
92+; - output_buffering = 4096 [Performance]
93+; Set a 4KB output buffer. Enabling output buffering typically results in less
94+; writes, and sometimes less packets sent on the wire, which can often lead to
95+; better performance. The gain this directive actually yields greatly depends
96+; on which Web server you're working with, and what kind of scripts you're using.
4342041a
JB
97+; - allow_call_time_pass_reference = Off [Code cleanliness]
98+; It's not possible to decide to force a variable to be passed by reference
99+; when calling a function. The PHP 4 style to do this is by making the
100+; function require the relevant argument by reference.
c5eb76fc 101+
4342041a 102 ;;;;;;;;;;;;;;;;;;;;
a00e0eb8
AM
103 ; Language Options ;
104@@ -86,7 +153,7 @@
9fab2fdf
JK
105 asp_tags = Off
106
107 ; The number of significant digits displayed in floating point numbers.
cc1337ae
JK
108-precision = 12
109+precision = 14
9fab2fdf
JK
110
111 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
4342041a 112 y2k_compliance = On
c5eb76fc
ER
113@@ -245,7 +312,7 @@
114 ; (e.g. by adding its signature to the Web server header). It is no security
115 ; threat in any way, but it makes it possible to determine whether you use PHP
116 ; on your server or not.
117-expose_php = On
118+expose_php = Off
119
120
121 ;;;;;;;;;;;;;;;;;;;
95a30b9d 122@@ -301,14 +368,16 @@
4342041a 123 ;
62277197 124 ; - Show all errors except for notices and coding standards warnings
0ced536a 125 ;
62277197
AM
126-error_reporting = E_ALL & ~E_NOTICE
127+;error_reporting = E_ALL & ~E_NOTICE
128+
129+error_reporting = E_ALL
4342041a
JB
130
131 ; Print out errors (as a part of the output). For production web sites,
132 ; you're strongly encouraged to turn this feature off, and use error logging
133 ; instead (see below). Keeping display_errors enabled on a production web site
134 ; may reveal security information to end users, such as file paths on your Web
135 ; server, your database schema or other information.
136-display_errors = On
137+display_errors = Off
138
139 ; Even when display_errors is on, errors that occur during PHP's startup
140 ; sequence are not displayed. It's strongly recommended to keep
95a30b9d 141@@ -318,7 +387,7 @@
2f814ad2
ER
142 ; Log errors into a log file (server-specific log, stderr, or error_log (below))
143 ; As stated above, you're strongly advised to use error logging in place of
144 ; error displaying on production web sites.
145-log_errors = Off
146+log_errors = On
147
148 ; Set maximum length of log_errors. In error_log information about the source is
149 ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
95a30b9d 150@@ -345,7 +414,7 @@
87831047
ER
151
152 ; Disable the inclusion of HTML tags in error messages.
153 ; Note: Never use this feature for production boxes.
154-;html_errors = Off
155+html_errors = Off
156
157 ; If html_errors is set On PHP produces clickable error messages that direct
158 ; to a page describing the error or function causing the error in detail.
95a30b9d 159@@ -389,7 +458,7 @@
20e4fbdf
ER
160 ; Environment and Built-in variables (G, P, C, E & S respectively, often
161 ; referred to as EGPCS or GPC). Registration is done from left to right, newer
162 ; values override older values.
163-variables_order = "EGPCS"
164+variables_order = "GPCS"
165
166 ; Whether or not to register the EGPCS variables as global variables. You may
167 ; want to turn this off if you don't want to clutter your scripts' global scope
95a30b9d 168@@ -405,12 +474,12 @@
20e4fbdf
ER
169 ; Whether or not to register the old-style input arrays, HTTP_GET_VARS
170 ; and friends. If you're not using them, it's recommended to turn them off,
171 ; for performance reasons.
172-register_long_arrays = On
173+register_long_arrays = Off
174
175 ; This directive tells PHP whether to declare the argv&argc variables (that
176 ; would contain the GET information). If you don't use these variables, you
177 ; should turn it off for increased performance.
178-register_argc_argv = On
179+register_argc_argv = Off
180
181 ; When enabled, the SERVER and ENV variables are created when they're first
182 ; used (Just In Time) instead of when the script starts. If these variables
95a30b9d 183@@ -426,7 +495,7 @@
20e4fbdf
ER
184 ;
185
186 ; Magic quotes for incoming GET/POST/Cookie data.
187-magic_quotes_gpc = On
188+magic_quotes_gpc = Off
189
190 ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
191 magic_quotes_runtime = Off
95a30b9d 192@@ -472,7 +541,7 @@
62277197
AM
193 user_dir =
194
195 ; Directory in which the loadable extensions (modules) reside.
196-extension_dir = "./"
197+extension_dir = "/usr/lib/php"
198
199 ; Whether or not to enable the dl() function. The dl() function does NOT work
200 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
e8baea14 201@@ -645,59 +645,6 @@
bdc88c24
ER
202 ; needs to go here. Specify the location of the extension with the
203 ; extension_dir directive above.
204
205-
206-; Windows Extensions
207-; Note that ODBC support is built in, so no dll is needed for it.
208-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
209-; extension folders as well as the separate PECL DLL download (PHP 5).
210-; Be sure to appropriately set the extension_dir directive.
211-
bdc88c24
ER
212-;extension=php_bz2.dll
213-;extension=php_curl.dll
214-;extension=php_dba.dll
215-;extension=php_dbase.dll
216-;extension=php_exif.dll
217-;extension=php_fdf.dll
bdc88c24
ER
218-;extension=php_gd2.dll
219-;extension=php_gettext.dll
e8baea14 220-;extension=php_gmp.dll
bdc88c24
ER
221-;extension=php_ifx.dll
222-;extension=php_imap.dll
223-;extension=php_interbase.dll
224-;extension=php_ldap.dll
e8baea14 225-;extension=php_mbstring.dll
bdc88c24
ER
226-;extension=php_mcrypt.dll
227-;extension=php_mhash.dll
228-;extension=php_mime_magic.dll
229-;extension=php_ming.dll
bdc88c24 230-;extension=php_msql.dll
e8baea14 231-;extension=php_mssql.dll
bdc88c24 232-;extension=php_mysql.dll
e8baea14 233-;extension=php_mysqli.dll
bdc88c24
ER
234-;extension=php_oci8.dll
235-;extension=php_openssl.dll
e8baea14
ER
236-;extension=php_pdo.dll
237-;extension=php_pdo_firebird.dll
238-;extension=php_pdo_mssql.dll
239-;extension=php_pdo_mysql.dll
240-;extension=php_pdo_oci.dll
241-;extension=php_pdo_oci8.dll
242-;extension=php_pdo_odbc.dll
243-;extension=php_pdo_pgsql.dll
244-;extension=php_pdo_sqlite.dll
bdc88c24 245-;extension=php_pgsql.dll
e8baea14 246-;extension=php_pspell.dll
bdc88c24
ER
247-;extension=php_shmop.dll
248-;extension=php_snmp.dll
e8baea14 249-;extension=php_soap.dll
bdc88c24
ER
250-;extension=php_sockets.dll
251-;extension=php_sqlite.dll
252-;extension=php_sybase_ct.dll
253-;extension=php_tidy.dll
254-;extension=php_xmlrpc.dll
255-;extension=php_xsl.dll
e8baea14 256-;extension=php_zip.dll
bdc88c24
ER
257-
258 ;;;;;;;;;;;;;;;;;;;
259 ; Module Settings ;
260 ;;;;;;;;;;;;;;;;;;;
55309ada
PG
261@@ -879,7 +879,7 @@
262 bcmath.scale = 0
263
264 [browscap]
265-;browscap = extra/browscap.ini
7be993d3 266+browscap = /etc/php/browscap.ini
55309ada
PG
267
268 [Informix]
269 ; Default host for ifx_connect() (doesn't apply in safe mode).
95a30b9d 270@@ -1205,7 +1232,7 @@
614d53e4
ER
271 ; Enables or disables WSDL caching feature.
272 soap.wsdl_cache_enabled=1
273 ; Sets the directory name where SOAP extension will put cache files.
274-soap.wsdl_cache_dir="/tmp"
275+soap.wsdl_cache_dir="/var/run/php"
276 ; (time to live) Sets the number of second while cached file will be used
277 ; instead of original one.
278 soap.wsdl_cache_ttl=86400
This page took 0.079584 seconds and 4 git commands to generate.