]> git.pld-linux.org Git - packages/php.git/blame - php-ini.patch
- kill Icon: field (support for these is obsolete says jbj)
[packages/php.git] / php-ini.patch
CommitLineData
62277197
AM
1diff -urbB php-5.1.0.org/php.ini php-5.1.0/php.ini
2--- php-5.1.0.org/php.ini 2005-11-25 02:24:23.408519000 +0100
3+++ php-5.1.0/php.ini 2005-11-25 02:26:06.570966750 +0100
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 ;
62277197 30@@ -59,11 +64,73 @@
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+; If you use constants in your value, and these constants belong to a
38+; dynamically loaded extension (either a PHP extension or a Zend extension),
39+; you may only use these constants *after* the line that loads the extension.
62277197
AM
40
41
4342041a
JB
42+; Below is the list of settings changed from default as specified in
43+; php.ini-recommended. These settings make PHP more secure and encourage
44+; cleaner coding.
45+; The price is that with these settings, PHP may be incompatible with some old
46+; or bad-written applications, and sometimes, more difficult to develop with.
47+; Using this settings is warmly recommended for production sites. As all of
48+; the changes from the standard settings are thoroughly documented, you can
49+; go over each one, and decide whether you want to use it or not.
50+;
51+; - register_globals = Off [Security, Performance]
52+; Global variables are no longer registered for input data (POST, GET, cookies,
53+; environment and other server variables). Instead of using $foo, you must use
54+; you can use $_REQUEST["foo"] (includes any variable that arrives through the
55+; request, namely, POST, GET and cookie variables), or use one of the specific
56+; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
57+; on where the input originates. Also, you can look at the
58+; import_request_variables() function.
59+; Note that register_globals = Off is the default setting since PHP 4.2.0.
60+; - display_errors = Off [Security]
61+; With this directive set to off, errors that occur during the execution of
62+; scripts will no longer be displayed as a part of the script output, and thus,
63+; will no longer be exposed to remote users. With some errors, the error message
64+; content may expose information about your script, web server, or database
65+; server that may be exploitable for hacking. Production sites should have this
66+; directive set to off.
67+; - log_errors = On [Security]
68+; This directive complements the above one. Any errors that occur during the
69+; execution of your script will be logged (typically, to your server's error log,
70+; but can be configured in several ways). Along with setting display_errors to off,
71+; this setup gives you the ability to fully understand what may have gone wrong,
72+; without exposing any sensitive information to remote users.
73+; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
74+; By default, PHP surpresses errors of type E_NOTICE. These error messages
75+; are emitted for non-critical errors, but that could be a symptom of a bigger
76+; problem. Most notably, this will cause error messages about the use
77+; of uninitialized variables to be displayed.
78+
79+; For completeness, below is list of the rest of changes recommended for
80+; performance, but NOT applied in default php.ini in PLD (since they are
81+; not needed for security or may cause problems with some applications
82+; more likely than above).
ff83cd8b 83+
4342041a
JB
84+; - output_buffering = 4096 [Performance]
85+; Set a 4KB output buffer. Enabling output buffering typically results in less
86+; writes, and sometimes less packets sent on the wire, which can often lead to
87+; better performance. The gain this directive actually yields greatly depends
88+; on which Web server you're working with, and what kind of scripts you're using.
89+; - register_argc_argv = Off [Performance]
90+; Disables registration of the somewhat redundant $argv and $argc global
91+; variables.
92+; - magic_quotes_gpc = Off [Performance]
93+; Input data is no longer escaped with slashes so that it can be sent into
94+; SQL databases without further manipulation. Instead, you should use the
95+; function addslashes() on each input element you wish to send to a database.
96+; - variables_order = "GPCS" [Performance]
97+; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access
98+; environment variables, you can use getenv() instead.
99+; - allow_call_time_pass_reference = Off [Code cleanliness]
100+; It's not possible to decide to force a variable to be passed by reference
101+; when calling a function. The PHP 4 style to do this is by making the
102+; function require the relevant argument by reference.
62277197 103+
4342041a 104 ;;;;;;;;;;;;;;;;;;;;
a00e0eb8 105 ; Language Options ;
62277197 106 ;;;;;;;;;;;;;;;;;;;;
a00e0eb8 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
62277197 116@@ -289,14 +356,16 @@
4342041a 117 ;
62277197 118 ; - Show all errors except for notices and coding standards warnings
0ced536a 119 ;
62277197
AM
120-error_reporting = E_ALL & ~E_NOTICE
121+;error_reporting = E_ALL & ~E_NOTICE
122+
123+error_reporting = E_ALL
4342041a
JB
124
125 ; Print out errors (as a part of the output). For production web sites,
126 ; you're strongly encouraged to turn this feature off, and use error logging
127 ; instead (see below). Keeping display_errors enabled on a production web site
128 ; may reveal security information to end users, such as file paths on your Web
129 ; server, your database schema or other information.
130-display_errors = On
131+display_errors = Off
132
133 ; Even when display_errors is on, errors that occur during PHP's startup
134 ; sequence are not displayed. It's strongly recommended to keep
62277197 135@@ -306,7 +375,7 @@
2f814ad2
ER
136 ; Log errors into a log file (server-specific log, stderr, or error_log (below))
137 ; As stated above, you're strongly advised to use error logging in place of
138 ; error displaying on production web sites.
139-log_errors = Off
140+log_errors = On
141
142 ; Set maximum length of log_errors. In error_log information about the source is
143 ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
62277197
AM
144@@ -458,7 +527,7 @@
145 user_dir =
146
147 ; Directory in which the loadable extensions (modules) reside.
148-extension_dir = "./"
149+extension_dir = "/usr/lib/php"
150
151 ; Whether or not to enable the dl() function. The dl() function does NOT work
152 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
bdc88c24
ER
153--- php-5.1.1/php.ini~ 2005-12-19 19:44:04.000000000 +0200
154+++ php-5.1.1/php.ini 2005-12-19 20:01:09.000000000 +0200
155@@ -628,48 +628,6 @@
156 ; needs to go here. Specify the location of the extension with the
157 ; extension_dir directive above.
158
159-
160-; Windows Extensions
161-; Note that ODBC support is built in, so no dll is needed for it.
162-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
163-; extension folders as well as the separate PECL DLL download (PHP 5).
164-; Be sure to appropriately set the extension_dir directive.
165-
166-;extension=php_mbstring.dll
167-;extension=php_bz2.dll
168-;extension=php_curl.dll
169-;extension=php_dba.dll
170-;extension=php_dbase.dll
171-;extension=php_exif.dll
172-;extension=php_fdf.dll
173-;extension=php_filepro.dll
174-;extension=php_gd2.dll
175-;extension=php_gettext.dll
176-;extension=php_ifx.dll
177-;extension=php_imap.dll
178-;extension=php_interbase.dll
179-;extension=php_ldap.dll
180-;extension=php_mcrypt.dll
181-;extension=php_mhash.dll
182-;extension=php_mime_magic.dll
183-;extension=php_ming.dll
184-;extension=php_mssql.dll
185-;extension=php_msql.dll
186-;extension=php_mysql.dll
187-;extension=php_oci8.dll
188-;extension=php_openssl.dll
189-;extension=php_oracle.dll
190-;extension=php_pgsql.dll
191-;extension=php_shmop.dll
192-;extension=php_snmp.dll
193-;extension=php_sockets.dll
194-;extension=php_sqlite.dll
195-;extension=php_sybase_ct.dll
196-;extension=php_tidy.dll
197-;extension=php_xmlrpc.dll
198-;extension=php_xsl.dll
199-
200-
201 ;;;;;;;;;;;;;;;;;;;
202 ; Module Settings ;
203 ;;;;;;;;;;;;;;;;;;;
a8122568
ER
204--- php-5.1.1/php.ini~ 2005-12-19 20:01:09.000000000 +0200
205+++ php-5.1.1/php.ini 2005-12-19 20:04:03.000000000 +0200
206@@ -465,7 +465,7 @@
207 ; This directive tells PHP whether to declare the argv&argc variables (that
208 ; would contain the GET information). If you don't use these variables, you
209 ; should turn it off for increased performance.
210-register_argc_argv = On
211+register_argc_argv = Off
212
213 ; When enabled, the SERVER and ENV variables are created when they're first
214 ; used (Just In Time) instead of when the script starts. If these variables
b8c2aed7
ER
215--- php-5.1.1/php.ini~ 2005-12-19 20:04:03.000000000 +0200
216+++ php-5.1.1/php.ini 2005-12-19 20:08:54.000000000 +0200
217@@ -460,7 +460,7 @@
218 ; Whether or not to register the old-style input arrays, HTTP_GET_VARS
219 ; and friends. If you're not using them, it's recommended to turn them off,
220 ; for performance reasons.
221-register_long_arrays = On
222+register_long_arrays = Off
223
224 ; This directive tells PHP whether to declare the argv&argc variables (that
225 ; would contain the GET information). If you don't use these variables, you
226@@ -588,7 +588,7 @@
227 ;;;;;;;;;;;;;;;;;;
228
229 ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
230-allow_url_fopen = On
231+allow_url_fopen = Off
232
233 ; Define the anonymous ftp password (your email address)
234 ;from="john@doe.com"
This page took 0.094488 seconds and 4 git commands to generate.