[LOAD DATA sur PHP ] "The used command is not allowed with this MySQL version"
Bonjour à tous,
Je bloque sur une erreur mysqli dans mon script PHP, je fais un load data qui me retourne "" The used command is not allowed with this MySQL version".
Voici mon code PHP:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <?php
include('config.php');
$load_data = mysqli_query($connexion, "LOAD DATA LOCAL INFILE '20190228.csv' INTO TABLE microsoft FIELDS
TERMINATED BY ';'
ESCAPED BY '\"'
LINES
STARTING BY ''
TERMINATED BY '\n'
(cle, code_article, date_commande, numero_commande, coa)");
if(!$load_data){
echo("Error description: " . mysqli_error($connexion));
}
?> |
voici ce qu'affiche pas page web : "Error description: The used command is not allowed with this MySQL version"
et voici enfin, ma conf:
Code:
1 2 3 4 5 6 7
|
define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'k001');
define('_DB_USER_', 'k001');
define('_DB_PASSWD_', 'xxx');
$connexion = mysqli_connect(_DB_SERVER_,_DB_USER_,_DB_PASSWD_,_DB_NAME_); |
dans mon phpinfo():
Citation:
mysql.allow_local_infile On
mysql.allow_persistent On
et mon fichier csv contient juste "a;z;e;r;t" pour tester ...
Est-ce que vous auriez une idée de solution svp ? dans les forums il parle de "--enable--localinfile" etc , mais en ligne de cmd sur mysql j'ai bien:
Citation:
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
Merci d'avance