go to bug id or search bugs for
php has changed the default value for mysqli.allow_local_infile to "Off". However, when an application tries to execute a LOAD DATA LOCAL INFILE a completely uninformative and misleading error message is thrown:
A MySQL query did not run successfully!
Original query: LOAD DATA LOCAL INFILE '/data2/cqpweb/cach/tab_dist_fycel9oplk' INTO TABLE `db_dist_g2f3ndxf40` FIELDS ESCAPED BY '' /* from User: knappen |
Function: create_db() | 2019-Apr-25 11:23:01 */
Error # 0:
It seems to blame MySQL for not running the query although the cause of failure is the php configuration.
The error message should say something like "MySQL query forbidden by configuration, mysqli.allow_local_infile = Off".
In this case it is possible to search for the cause of this behaviour and for a remedy.
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper
Add a Patch
Add a Pull Request
As I have learned, the php error message is just the error number, in this case the uninformative code "0" meaning "no error at all". There should be an error code for "Forbidden by configuration" that the application can translate into something meaningful.
I reproduced this - but I got a perfectly fine warning:
Warning: mysqli::query(): LOAD DATA LOCAL INFILE forbidden in test.php on line 17
maybe cqpweb fiddles with your error-reporting settings?
I do agree with the missing error-code btw
Automatic comment on behalf of email@example.com
Log: Fix #77956 - When mysqli.allow_local_infile = Off, return a client error