[Phpmyadmin-devel] [Patch] Allow for "LOAD DATA INFILE" when using the PHP-bundled mysql client
mp at webfactory.de
Mon Sep 20 03:39:02 CEST 2004
I hope this is the right place and right way to submit this patch?
As you probably know, MySQL has disabled the "LOCAL" option for "LOAD
DATA INFILE" statements for security reasons as of MySQL 3.23.49. To be
able to use "LOAD DATA LOCAL", you will have to add
local-infile = 1
to both you server's and client's my.cnf files. (Please be aware of the
However, when using the mysql client bundled with PHP, these settings
don't apply. Instead, you will have to pass the appropriate flag as an
extra parameter to mysql_connect.
This patch adds a new config directive
$cfg['Servers'][..]['infile_local'] = (TRUE | FALSE). Setting it to
"TRUE" enables the mysql client bundled with PHP to use "LOAD DATA
LOCAL" for this connection.
Without having tested it, you should be able to use LOAD DATA LOCAL
without setting this option if you compiled PHP with
--with-mysql=/path/to/mysql (thus you did not use the client bundled
with PHP) and setup my.cnf correctly.
Even when passing the additional parameter to mysql_(p)connect, the use
of open_basedir may restrict its usage.
Besides that, there was a typo in mysql.dbi.lib.php that prevented
passing the $client_flags to mysql_(p)connect at all; so far, that
should have broken the use of MYSQL_CLIENT_COMPRESS.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Developers