1 diff -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
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.
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).
21 +; Please note, that in PLD installations /etc/php/php.ini file
22 +; contains global settings for all SAPIs (cgi, cli, apache...),
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
25 +; (so you don't have to duplicate whole large file to override only
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).
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.
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
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.
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.
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).
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
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.
110 ; The number of significant digits displayed in floating point numbers.
114 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
116 @@ -289,14 +356,16 @@
118 ; - Show all errors except for notices and coding standards warnings
120 -error_reporting = E_ALL & ~E_NOTICE
121 +;error_reporting = E_ALL & ~E_NOTICE
123 +error_reporting = E_ALL
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.
131 +display_errors = Off
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
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.
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.
147 ; Directory in which the loadable extensions (modules) reside.
148 -extension_dir = "./"
149 +extension_dir = "/usr/lib/php"
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
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
156 ; needs to go here. Specify the location of the extension with the
157 ; extension_dir directive above.
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.
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
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
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
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
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
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
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
229 ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
230 -allow_url_fopen = On
231 +allow_url_fopen = Off
233 ; Define the anonymous ftp password (your email address)