Bug #77956 [NEW]: When mysqli.allow_local_infile = Off, use a meaningful error message
| From: | j dot knappen at mx dot uni-saarland dot de | Date: | Wed, 01 May 2019 14:38:33 +0000 |
| Subject: | Bug #77956 [NEW]: When mysqli.allow_local_infile = Off, use a meaningful error message | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-220667@lists.php.net to get a copy of this message | ||
From: j dot knappen at mx dot uni-saarland dot de
Operating system: ubuntu 18.04 LTS
PHP version: 7.2.17
Package: MySQLi related
Bug Type: Bug
Bug description:When mysqli.allow_local_infile = Off, use a meaningful error message
Description:
------------
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 --version
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )
mysql --version
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine
wrapper
Test script:
---------------
https://askubuntu.com/q/1138415/284224
--
Edit bug report at https://bugs.php.net/bug.php?id=77956&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77956&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77956&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77956&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77956&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77956&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77956&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77956&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77956&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77956&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77956&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77956&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77956&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77956&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77956&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77956&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77956&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77956&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77956&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77956&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77956&r=mysqlcfg