diff options
author | Stanislav Malyshev <stas@php.net> | 2007-06-18 21:51:32 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-06-18 21:51:32 +0000 |
commit | b925a9248b11823f834a139a7af106aaea1ca087 (patch) | |
tree | 0e36467556f8f85275c687a0c3b778344a1f15c8 /ext/pdo_mysql | |
parent | 210f09102202f96f5b0ef04bed6544741aaa703a (diff) | |
download | php-git-b925a9248b11823f834a139a7af106aaea1ca087.tar.gz |
Fix INFILE LOCAL option handling with MySQL - now not allowed when open_basedir
or safe_mode is active
Diffstat (limited to 'ext/pdo_mysql')
-rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 8f099e0d71..0519d585c6 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -492,7 +492,11 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ pdo_mysql_error(dbh); goto cleanup; } - + + if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) { + local_infile = 0; + } + if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) { pdo_mysql_error(dbh); goto cleanup; |