Edit report at https://bugs.php.net/bug.php?id=55737&edit=1

 ID:                 55737
 Comment by:         dimm-man at yandex dot ru
 Reported by:        stefan dot kaifer at hartmann dot info
 Summary:            LOAD DATA LOCAL INFILE - The used command is not
                     allowed with this MySQL versio
 Status:             Not a bug
 Type:               Bug
 Package:            MySQL related
 Operating System:   opensuse 11.0
 PHP Version:        5.3.8
 Assigned To:        mysql
 Block user comment: N
 Private report:     N

 New Comment:

In Debian Wheezy amd64 (PHP 5.4), this problem has not been solved. "LOAD DATA 
LOCAL INFILE" a PDO does not work.


Previous Comments:
------------------------------------------------------------------------
[2013-04-03 21:16:30] haertl dot mike at gmail dot com

On a client machine this issue went away, when i replaced the MySQL clients 
with 
those from MariaDB.

------------------------------------------------------------------------
[2013-03-31 08:57:28] mamm at ya dot ru

I have same problem, ubuntu 12, and load data cant be enabled, works only from 
mysql

------------------------------------------------------------------------
[2013-03-22 12:27:03] haertl dot mike at gmail dot com

The bug still doesn't seem to be solved. I'm on Ubuntu 12.10 with php-fpm 5.4.6-
1ubuntu1.2 amd64 and still can call "LOAD DATA LOCAL INFILE" through PDO. It's 
still the same error:

#1148 - The used command is not allowed with this MySQL version 

I've also tried to set "local-infile" in the [client] and [mysql] section of 
MySQL`s my.cnf without success. LOAD DATA LOCAL INFILE works fine with the 
mysql 
client on console though.

------------------------------------------------------------------------
[2012-11-22 03:10:32] major_sheisskopf at hotmail dot com

Guys. The answer to this is very easy if you are using the deprecated mysql 
functions.

mysql_connect(HOST,USER,PASS,false,128);


Usually, you use mysql_connect without the last 2 optional arguments. But check 
out the manual page for it and you'll see that 128 enables LOAD DATA INFILE.

I don't know what the solution is for PDO, as I have not switched over to using 
it yet.

------------------------------------------------------------------------
[2012-05-06 00:36:40] denis_truffaut at hotmail dot com

To : u...@php.net

This bug appears when you use both PDO (pdo_mysql) and mysqlnd (the php mysql 
native driver).

The last time I tested PHP 5.4, it was not solved so i tricked the sources to 
make it work, before compiling php.

A dirty fix is :

sudo sed -i -e 's/if (mysql_options(H->server, 
MYSQL_OPT_LOCAL_INFILE/local_infile = 1;if (mysql_options(H->server, 
MYSQL_OPT_LOCAL_INFILE/g' ext/pdo_mysql/mysql_driver.c

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=55737


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55737&edit=1

Reply via email to