Welcome Guest, Not a member yet? Register   Sign In
Database Error on LOAD DATA INFILE command

I am using:

MySQL 5.5.46-0ubuntu0.14.04.2.
PHP Version 5.5.9-1ubuntu4.14
CI version 3.0.0

I have a controller that accept two files for upload. I am using the file upload class. I have verified that the files are uploaded, placed in the /uploads/ folder and named properly. I checked the case of the file names too.

After the files are uploaded, I copy them to the /tmp/ folder on the server and then send up a LOAD DATA command as follows:

PHP Code:
$lcSQL "LOAD DATA $local INFILE '$tcFile' " .
"INTO TABLE `$tcTable` " .
"(field list here, truncated for space) ";

The table and file variables are passed through to the controller.

OK, the bottom line is that I am getting a database error that the file I am passing through does not exist. Trouble is, it does. I have visually confirmed this.

Some more details:

1) I set the permissions of the file to 777
2) I checked the case and every character of the file name. It definitely exists.

Any thoughts on this?


Theme © iAndrew 2016 - Forum software by © MyBB