]> git.pld-linux.org Git - packages/php.git/blob - php-ini.patch
- no windows here
[packages/php.git] / php-ini.patch
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
4 @@ -3,13 +3,18 @@
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.
14 -
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 +;
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
26 +; few options)
27  
28  ;;;;;;;;;;;;;;;;;;;
29  ; About php.ini   ;
30 @@ -59,11 +64,73 @@
31  ;;;;;;;;;;;;;;;;;;;
32  ; About this file ;
33  ;;;;;;;;;;;;;;;;;;;
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.
40  
41  
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).
83 +
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.
103 +
104  ;;;;;;;;;;;;;;;;;;;;
105  ; Language Options ;
106  ;;;;;;;;;;;;;;;;;;;;
107 @@ -86,7 +153,7 @@
108  asp_tags = Off
109  
110  ; The number of significant digits displayed in floating point numbers.
111 -precision    =  12
112 +precision    =  14
113  
114  ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
115  y2k_compliance = On
116 @@ -289,14 +356,16 @@
117  ;
118  ;   - Show all errors except for notices and coding standards warnings
119  ;
120 -error_reporting  =  E_ALL & ~E_NOTICE
121 +;error_reporting  =  E_ALL & ~E_NOTICE
122 +
123 +error_reporting = E_ALL
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
135 @@ -306,7 +375,7 @@
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.
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
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  ;;;;;;;;;;;;;;;;;;;
This page took 0.072724 seconds and 4 git commands to generate.