diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2016-08-11 05:06:55 +0200 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2016-08-11 05:06:55 +0200 |
commit | 197051f3ab50a0e4ee6d15cd09099f21852d1c14 (patch) | |
tree | 14fc7bca5b898e1e8b03ff70d3193a6940fcfe51 | |
parent | 13e076f446b0997033b0f5dc886ee874c137775b (diff) | |
download | php-git-197051f3ab50a0e4ee6d15cd09099f21852d1c14.tar.gz |
Remove sql.safe_mode
This is one of the last old and odd deprecated settings we still have in PHP, it was never fully implemented in all the database extensions and should probably have been gone back in 5.4, along with safe_mode. Although if my memory strikes me right, mysql was also supporting it back then, but not mysqli.
So far only interbase was supporting this feature, and the removal of it causes two effects for interbase:
- CREATE DATABASE is now allowed no matter
- The default database set by php.ini (ibase.default_db) is no longer forced
http://php.net/ini.core#ini.sql.safe-mode
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | UPGRADING | 3 | ||||
-rw-r--r-- | ext/interbase/ibase_query.c | 4 | ||||
-rw-r--r-- | ext/interbase/interbase.c | 2 | ||||
-rw-r--r-- | main/main.c | 1 | ||||
-rw-r--r-- | main/php_globals.h | 1 | ||||
-rw-r--r-- | php.ini-development | 4 | ||||
-rw-r--r-- | php.ini-production | 4 |
8 files changed, 5 insertions, 15 deletions
@@ -3,6 +3,7 @@ PHP NEWS ?? ??? 2016, PHP 7.2.0alpha1 - Core: + . Removed the sql.safe_mode directive. (Kalle) . Fixed bug #54535 (WSA cleanup executes before MSHUTDOWN). (Kalle) - EXIF: @@ -316,6 +316,9 @@ PHP 7.1 UPGRADE NOTES . If the value is set to -1, then the dtoa mode 0 is used. No changes in default value which is still 14. +- sql.safe_mode + . This INI directive have been removed. + ======================================== 12. Windows Support ======================================== diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index 37e59dd3a7..77de9f77e4 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -1109,10 +1109,6 @@ PHP_FUNCTION(ibase_query) isc_db_handle db = 0; isc_tr_handle trans = 0; - if (PG(sql_safe_mode)) { - _php_ibase_module_error("CREATE DATABASE is not allowed in SQL safe mode" - ); - } else if (((l = INI_INT("ibase.max_links")) != -1) && (IBG(num_links) >= l)) { _php_ibase_module_error("CREATE DATABASE is not allowed: maximum link count " "(" ZEND_LONG_FMT ") reached", l); diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 531019b841..a4e51c27a6 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -902,7 +902,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* } /* restrict to the server/db in the .ini if in safe mode */ - if ((!len[DB] || PG(sql_safe_mode)) && (c = INI_STR("ibase.default_db"))) { + if (!len[DB] && (c = INI_STR("ibase.default_db"))) { args[DB] = c; len[DB] = strlen(c); } diff --git a/main/main.c b/main/main.c index 248341c114..bb98f27071 100644 --- a/main/main.c +++ b/main/main.c @@ -546,7 +546,6 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals) - STD_PHP_INI_BOOLEAN("sql.safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, sql_safe_mode, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("track_errors", "0", PHP_INI_ALL, OnUpdateBool, track_errors, php_core_globals, core_globals) STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals) diff --git a/main/php_globals.h b/main/php_globals.h index e50ea2ebfb..91bd100f7e 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -58,7 +58,6 @@ struct _php_core_globals { zend_long output_buffering; - zend_bool sql_safe_mode; zend_bool enable_dl; char *output_handler; diff --git a/php.ini-development b/php.ini-development index 34a561851c..7aa50a21e3 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1045,10 +1045,6 @@ mail.add_x_header = On ; Log mail to syslog (Event Log on Windows). ;mail.log = syslog -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - [ODBC] ; http://php.net/odbc.default-db ;odbc.default_db = Not yet implemented diff --git a/php.ini-production b/php.ini-production index e95b1cfb70..224b72959d 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1045,10 +1045,6 @@ mail.add_x_header = On ; Log mail to syslog (Event Log on Windows). ;mail.log = syslog -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - [ODBC] ; http://php.net/odbc.default-db ;odbc.default_db = Not yet implemented |