From da011a312a6c6cd7ff12fe1aa0de1e33fba2f167 Mon Sep 17 00:00:00 2001 From: Darek Slusarczyk Date: Mon, 22 Feb 2021 11:03:24 +0100 Subject: Fix #80329: Add option to specify LOAD DATA LOCAL white list folder * allow the user to specify a folder where files that can be sent via LOAD DATA LOCAL can exist * add mysqli.local_infile_directory for mysqli (ignored if mysqli.allow_local_infile is enabled) * add PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY for pdo_mysql (ignored if PDO::MYSQL_ATTR_LOCAL_INFILE is enabled) * add related tests * fixes for building with libmysql 8.x * small improvement in existing tests * update php.ini-[development|production] files Closes GH-6448. Co-authored-by: Nikita Popov --- ext/mysqli/mysqli_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/mysqli/mysqli_api.c') diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index b968f73567..e1abd07135 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1210,7 +1210,7 @@ PHP_FUNCTION(mysqli_fetch_lengths) #ifdef MYSQLI_USE_MYSQLND const size_t *ret; #else - const zend_ulong *ret; + const unsigned long *ret; #endif if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) { @@ -1673,6 +1673,9 @@ static int mysqli_options_get_option_zval_type(int option) case MYSQL_SET_CHARSET_DIR: #if MYSQL_VERSION_ID > 50605 || defined(MYSQLI_USE_MYSQLND) case MYSQL_SERVER_PUBLIC_KEY: +#endif +#if MYSQL_VERSION_ID >= 80021 || defined(MYSQLI_USE_MYSQLND) + case MYSQL_OPT_LOAD_DATA_LOCAL_DIR: #endif return IS_STRING; -- cgit v1.2.1