com php-src: Remove sql.safe_mode: NEWS UPGRADING e xt/interbase/ibase_query.c ext/interbase/interbase.c main/main.c main/php_globals.h
php.ini-development php.ini-production
| From: | Kalle Sommer Nielsen | Date: | Thu, 11 Aug 2016 03:06:55 +0000 |
| Subject: | com php-src: Remove sql.safe_mode: NEWS UPGRADING e xt/interbase/ibase_query.c ext/interbase/interbase.c main/main.c main/php_globals.h php.ini-development php.ini-production |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93738@lists.php.net to get a copy of this message | ||
Commit: 197051f3ab50a0e4ee6d15cd09099f21852d1c14
Author: Kalle Sommer Nielsen <kalle@php.net> Thu, 11 Aug 2016 05:06:55 +0200
Parents: 13e076f446b0997033b0f5dc886ee874c137775b
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=197051f3ab50a0e4ee6d15cd09099f21852d1c14
Log:
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
Changed paths:
M NEWS
M UPGRADING
M ext/interbase/ibase_query.c
M ext/interbase/interbase.c
M main/main.c
M main/php_globals.h
M php.ini-development
M php.ini-production
Diff:
diff --git a/NEWS b/NEWS
index e8c5a69..a91137e 100644
--- a/NEWS
+++ b/NEWS
@@ -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:
diff --git a/UPGRADING b/UPGRADING
index b99826d..9c53398 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -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 37e59dd..77de9f7 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 531019b..a4e51c2 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 248341c..bb98f27 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 e50ea2e..91bd100 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 34a5618..7aa50a2 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 e95b1cf..224b729 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