Edit report at http://bugs.php.net/bug.php?id=51960&edit=1
ID: 51960 User updated by: walkinraven at gmail dot com Reported by: walkinraven at gmail dot com Summary: PDO::MYSQL_ATTR_LOCAL_INFILE cause error always Status: Open Type: Bug Package: PDO related Operating System: Ubuntu 8.04 PHP Version: 5.2SVN-2010-06-01 (SVN) New Comment: Thank you! For there is no notice about this problem in user's manual ( http://www.php.net/manual/en/ref.pdo-mysql.php ), I have changed this into a problem of documentation. PDO::MYSQL_ATTR_LOCAL_INFILE can be set only at object initialization. Previous Comments: ------------------------------------------------------------------------ [2010-06-02 05:42:27] rgagnon24 at gmail dot com A correction to my comment above after reviewing the source code more. The attribute PDO::MYSQL_ATTR_LOCAL_INFILE is supported by PDO, but only during the initial creation of the PDO object. You must set PDO::MYSQL_ATTR_LOCAL_INFILE in your options array. That means this is not a bug. ------------------------------------------------------------------------ [2010-06-02 00:33:23] rgagnon24 at gmail dot com Looking in ext/pdo/mysql_driver.c, there is no support within get_attribute() nor set_attribute() for this attribute. This is why you always get false back. Its just not doing anything. We were running into just this same thing ourselves today in fact. ------------------------------------------------------------------------ [2010-06-01 05:27:00] walkinraven at gmail dot com Description: ------------ If you set PDO::MYSQL_ATTR_LOCAL_INFILE with PDO::setAttribute function, it will return FALSE, whatever you set it to TRUE or FALSE. Test script: --------------- // $pdo=new PDO(...); $result=$pdo->setAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE, FALSE); // or you could try set it to TRUE, you will get the same. $result=FALSE Expected result: ---------------- $result != FALSE Actual result: -------------- $result == FALSE ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51960&edit=1
