mysql was installed as an rpm, that have --local-infile=0 as default.
Iīm trying to load a csv file into mysql from a php script, trying not to install again mysql from source, nor rebuild the rpm package.
So I found that if I make the connect script in php as mentioned in bugs.php.net forum:
if you made a connection with mysql_connect() and specify 128 as fifth
parameter (options), you can perform sql LOAD DATA LOCAL INFILE
statements. the file accesses are made by mysql client library, so you
can access any file which webserver process can access to, IGNORING
open_basedir option! (and perhaps also safe-mode uid/gid checks, i don't
know...)
$m=mysql_connect($host, $user, $pass, false, 128);
// connect with MYSQL_OPT_LOCAL_INFILE (in php manual undocumented) option
it doesnīt work, displaying an error.
Any suggestions?
Do I need to install mysql with the --local-infile option turned on for proper operation?
The database in for internal use only, in an intranet, without public access.
Thanks in advance. -------------------------- Luis Martínez Ordoņez -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php