irabelle1994 Posted August 22, 2013 Share Posted August 22, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/281454-newbie-data-import-php-command-not-working/ Share on other sites More sharing options...
requinix Posted August 22, 2013 Share Posted August 22, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/281454-newbie-data-import-php-command-not-working/#findComment-1446229 Share on other sites More sharing options...
irabelle1994 Posted August 22, 2013 Author Share Posted August 22, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/281454-newbie-data-import-php-command-not-working/#findComment-1446240 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.