Doc #77786 [NEW]: set_local_infile_handler and set_local_infile_default methods of MySQLi

From: Date: Sat, 23 Mar 2019 17:38:32 +0000
Subject: Doc #77786 [NEW]: set_local_infile_handler and set_local_infile_default methods of MySQLi
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16505@lists.php.net to get a copy of this message
From: museyib dot e at gmail dot com Operating system: Kali kali-rolling (x86-64) PHP version: 7.3.3 Package: MySQLi related Bug Type: Documentation Problem Bug description:set_local_infile_handler and set_local_infile_default methods of MySQLi Description: ------------ --- From manual page: https://php.net/mysqli.set-local-infile-handler --- An error occurs at the methods "set_local_infile_handler" and "set_local_infile_default" of MySQLi class. Even the code sample in PHP documentation does not work. Test script: --------------- <?php $db = mysqli_init(); $db->real_connect("localhost","root","","test"); function callme($stream, &$buffer, $buflen, &$errmsg) { $buffer = fgets($stream); echo $buffer; $buffer = strtoupper(str_replace(",", "\t", $buffer)); return strlen($buffer); } echo "Input:\n"; $db->set_local_infile_handler("callme"); $db->query("LOAD DATA LOCAL INFILE 'input.txt' INTO TABLE t1"); $db->set_local_infile_default(); $res = $db->query("SELECT * FROM t1"); echo "\nResult:\n"; while ($row = $res->fetch_assoc()) { echo join(",", $row)."\n"; } ?> Expected result: ---------------- I expect that code will work successfully? it doesn't matter what resalt is. Actual result: -------------- But this error appears: Fatal error: Uncaught Error: Call to undefined method mysqli::set_local_infile_handler() -- Edit bug report at https://bugs.php.net/bug.php?id=77786&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77786&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77786&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77786&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77786&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77786&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77786&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77786&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77786&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77786&r=support Expected behavior: https://bugs.php.net/fix.php?id=77786&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77786&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77786&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77786&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77786&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77786&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77786&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77786&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77786&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77786&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77786&r=mysqlcfg

« previous php.doc.bugs (#16505) next »