more cleanup (lingering ini settings which do not exist anymore, etc.)

This commit is contained in:
foobar 2006-04-10 15:09:15 +00:00
parent 672266c735
commit 6af3218f81
9 changed files with 21 additions and 102 deletions

View File

@ -714,12 +714,10 @@ CGI environment and recommended modifications in php.ini
CGI-like environment variables.
Simply change your scripts to get CGI variables in the correct way for
PHP 4.x by using the superglobal $_SERVER. If you have older scripts
which use $HTTP_HOST, etc., you should turn on register_globals in
php.ini and change the variable order too (important: remove "E" from
it, because you do not need the environment here):
PHP 4.x by using the superglobal $_SERVER.
(important: remove "E" from variables_order because you do not need
the environment here):
variables_order = "GPCS"
register_globals = On
_________________________________________________________________
Special use for error pages or self-made directory listings (PHP >= 4.3.3)
@ -1430,7 +1428,6 @@ The configuration file
; Boolean values can be set to either:
; true, on, yes
; or false, off, no, none
register_globals = off
track_errors = yes
; you can enclose strings in double-quotes

View File

@ -2,7 +2,7 @@
// This script prints "skip" if condition does not meet.
/*
if (!extension_loaded("mbstring") && ini_get("enable_dl")) {
if (!extension_loaded("mbstring")) {
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
@dl("mbstring$dlext");
}

View File

@ -2,7 +2,6 @@
Bug #33940 array_map() fails to pass by reference when called recursively
--INI--
error_reporting=4095
allow_call_time_pass_reference=1
--FILE--
<?php
function ref_map(&$item) {

View File

@ -772,7 +772,7 @@ static void php_autoglobal_merge(HashTable *dest, HashTable *src TSRMLS_DC)
) {
(*src_entry)->refcount++;
if (key_type == HASH_KEY_IS_STRING) {
/* if register_globals is on and working with main symbol table, prevent overwriting of GLOBALS */
/* prevent overwriting of GLOBALS */
if (string_key_len != sizeof("GLOBALS") || memcmp(string_key.s, "GLOBALS", sizeof("GLOBALS") - 1)) {
zend_u_hash_update(dest, key_type, string_key, string_key_len, src_entry, sizeof(zval *), NULL);
} else {

View File

@ -71,9 +71,6 @@
; Enable the PHP scripting language engine under Apache.
engine = On
; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
@ -82,9 +79,6 @@ zend.ze1_compatibility_mode = Off
; be sure not to use short tags.
short_open_tag = On
; Allow ASP-style <% %> tags.
asp_tags = Off
; The number of significant digits displayed in floating point numbers.
precision = 12
@ -151,17 +145,6 @@ unserialize_callback_func=
; are decoded with unserialize, the data will remain the same.
serialize_precision = 100
; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
@ -353,11 +336,6 @@ track_errors = Off
; values override older values.
variables_order = "EGPCS"
; Whether or not to register the old-style input arrays, HTTP_GET_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.
register_long_arrays = On
; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
@ -366,8 +344,8 @@ register_argc_argv = On
; When enabled, the SERVER and ENV variables are created when they're first
; used (Just In Time) instead of when the script starts. If these variables
; are not used within a script, having this directive on will result in a
; performance gain. The PHP directives register_long_arrays and
; register_argc_argv must be disabled for this directive to have any affect.
; performance gain. The PHP directive register_argc_argv must be disabled
; for this directive to have any affect.
auto_globals_jit = On
; Maximum size of POST data that PHP will accept.
@ -388,7 +366,10 @@ default_mimetype = "text/html"
; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On
; Unicode settings
;;;;;;;;;;;;;;;;;;;;
; Unicode settings ;
;;;;;;;;;;;;;;;;;;;;
unicode_semantics = off
unicode.runtime_encoding = iso-8859-1
unicode.script_encoding = utf-8
@ -421,11 +402,6 @@ user_dir =
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
@ -481,6 +457,7 @@ upload_max_filesize = 2M
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
; Whether to allow code execution through URL wrappers
allow_url_include = Off
@ -889,15 +866,6 @@ session.gc_maxlifetime = 1440
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled. PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.
session.bug_compat_42 = 1
session.bug_compat_warn = 1
; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.

View File

@ -67,10 +67,6 @@
; PHP. Please make sure you read what's different, and modify your scripts
; accordingly, if you decide to use this file instead.
;
; - register_long_arrays = Off [Performance]
; Disables registration of the older (and deprecated) long predefined array
; variables ($HTTP_*_VARS). Instead, use the superglobals that were
; introduced in PHP 4.1.0
; - display_errors = Off [Security]
; With this directive set to off, errors that occur during the execution of
; scripts will no longer be displayed as a part of the script output, and thus,
@ -100,11 +96,6 @@
; are emitted for non-critical errors, but that could be a symptom of a bigger
; problem. Most notably, this will cause error messages about the use
; of uninitialized variables to be displayed.
; - allow_call_time_pass_reference = Off [Code cleanliness]
; It's not possible to decide to force a variable to be passed by reference
; when calling a function. The PHP 4 style to do this is by making the
; function require the relevant argument by reference.
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
@ -113,9 +104,6 @@
; Enable the PHP scripting language engine under Apache.
engine = On
; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
@ -124,9 +112,6 @@ zend.ze1_compatibility_mode = Off
; be sure not to use short tags.
short_open_tag = Off
; Allow ASP-style <% %> tags.
asp_tags = Off
; The number of significant digits displayed in floating point numbers.
precision = 14
@ -193,17 +178,6 @@ unserialize_callback_func=
; are decoded with unserialize, the data will remain the same.
serialize_precision = 100
; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = Off
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
@ -395,11 +369,6 @@ track_errors = Off
; values override older values.
variables_order = "GPCS"
; Whether or not to register the old-style input arrays, HTTP_GET_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.
register_long_arrays = Off
; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
@ -408,8 +377,8 @@ register_argc_argv = Off
; When enabled, the SERVER and ENV variables are created when they're first
; used (Just In Time) instead of when the script starts. If these variables
; are not used within a script, having this directive on will result in a
; performance gain. The PHP directives register_long_arrays and
; register_argc_argv must be disabled for this directive to have any affect.
; performance gain. The PHP directive register_argc_argv must be disabled
; for this directive to have any affect.
auto_globals_jit = On
; Maximum size of POST data that PHP will accept.
@ -430,7 +399,10 @@ default_mimetype = "text/html"
; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On
; Unicode settings
;;;;;;;;;;;;;;;;;;;;
; Unicode settings ;
;;;;;;;;;;;;;;;;;;;;
unicode_semantics = off
unicode.runtime_encoding = iso-8859-1
unicode.script_encoding = utf-8
@ -462,11 +434,6 @@ user_dir =
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
@ -930,15 +897,6 @@ session.gc_maxlifetime = 1440
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope.
; PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.
session.bug_compat_42 = 0
session.bug_compat_warn = 1
; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.

View File

@ -10,10 +10,8 @@ ab cd ef 123 test
--FILE--
<?php
if (!ini_get('register_globals')) {
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];
}
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];
for ($i=1; $i<$argc; $i++) {
echo ($i-1).": ".$argv[$i]."\n";

View File

@ -90,7 +90,7 @@ clean-pecl:
test:
<<test_suite_uses_lame_env_vars.bat
set TEST_PHP_EXECUTABLE=$(BUILD_DIR)\php.exe
$(BUILD_DIR)\php.exe -d open_basedir= -d safe_mode=0 -d output_buffering=0 run-tests.php $(TESTS)
$(BUILD_DIR)\php.exe -d open_basedir= -d output_buffering=0 run-tests.php $(TESTS)
<<NOKEEP
build-snap: generated_files

View File

@ -25,7 +25,6 @@
/* PHP Runtime Configuration */
#define PHP_URL_FOPEN 1
#define PHP_SAFE_MODE 0
#define MAGIC_QUOTES 0
#define USE_CONFIG_FILE 1
#define DEFAULT_SHORT_OPEN_TAG "1"