Jump to content

Newbie Data Import PHP command not working


irabelle1994

Recommended Posts

I am having error while using load data local infile on button..

--here's the code-

sc_exec_sql("load data local infile '/PATH/IMPORT/FILE' into table TABLETOIMPORT fields terminated by '\t' lines terminated by '\n'")

 

this script returns:

 

Error while accessing the database:

The used command is not allowed with this MySQL version

 

but it works fine when i execute this same script on mysql on server(Ubuntu server)

 

load data local infile '/PATH/IMPORT/FILE' into table TABLETOIMPORT fields terminated by '\t' lines terminated by '\n'

 

How to solve this problem?? 

 

Below are the details of my development environment

 

Ubuntu 13.04

PHP 5.49

MySQL 14.14

Rapid Development Tool - Scriptcase 7.1

 

Will appreciate your help :)

 

Ira

I have no idea why you think thought this was a regex question...

 

Google:

1. "The used command is not allowed with this MySQL version"

2. Result #2: Security Issues with LOAD DATA LOCAL

3.

If LOAD DATA LOCAL is disabled, either in the server or the client, a client that attempts to issue such a statement receives the following error message:

 

ERROR 1148: The used command is not allowed with this MySQL version

 

So now you should be asking "okay, then is it disabled on the server or on the client?" To check if it's the server:

4.

You can disable all LOAD DATA LOCAL statements from the server side by starting mysqld with the --local-infile=0 option.

Hi sorry for posting here. just joined and not really familiar with PHP and MySQL really a newbie....my officemate and I have already set the Load Data Local to 1 (enabled), that is why we have been able to execute the command at the command line, but when we place this same code in our PHP program, it is giving us the error "The used command is not allowed with this MySQL version."

 

Dont know how to proceed from there. Tried a lot of the threads we found via Google before we posted here. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.