Originally Posted by edziffel
what is called for is back tics on the file to upload
Nope; single quotes are required around the file name, since it is, after all, just a string.
Have no idea what a back tic is. Thought you meant apostrophe/single quote. So, what is a back tic anyway?
New errors are at least indicative of progress.
That's how I see it. :-) Was actually happier just to get it to generate the first error statement. You figure that at least your are on the right planet. lol
The 'Errorcode: 2' bit is the most helpful there, as that's an O/S error code that should correspond with (depending upon OS, of course) an error called 'ERROR_FILE_NOT_FOUND'. It's name is fairly self-explanatory.
Did not know that. Thanks again. Did treat it that way. See below.
Where did you get that filename? That is to say, are you sure that path is correct?
<form action="db_upload_post_to" method="post" enctype="multipart/form-data" >
<input type="file" name="fileupload" size="70"/>
<input type="submit" value="Upload"/>
</form>
Then
<?php
$dname=$_FILES["fileupload"]["tmp_name"];
echo "The temporay file name for the uploaded file is ".$dname."."."<br/>";
$_SESSION['csv_file_selected']=$dname;
?>
Was using session variable then hard coded temp file path and location, then tried to use absolute path to file hard coded in an effort to eliminate possibilities and isolate one issue at a time.
Is your MySQL server running on the same server as PHP? For example, when connecting to MySQL, do you use 'localhost' as the hostname or some other server's name?
Running a linux Ubuntu 10.04 lts with lamp, phpmyadim using bluefish as a text editor. Also using codeigniter as a framwork, although what I'm finding is that for doing a single app, it is quicker to just use functions than to try digging way deep into their system to get what you need. That said I am using some of their functionality to keep all the calls to new pages in a controller file. While not ruling out the possibility of a problem there, it is very unlikely as again I'm not using their prepackaged functions. So the PHP, MySQL and Apache server are all on the same local machine with localhost as the root URL: http://localhost/what_ever/even_more.
The original file is on a thumb drive, which winds up being a mounted partition... I think. Was planing to move it to another location on the main drive in a further "spray and pray" apporach. lol. The temp file /tmp/phpC0QUKw is in the server tmp file default directory. Not sure if the temp file would be any good even if it was being located; not sure it is still in a fomat, CVS, say, that that the LOAD DATA INFILE can read. Was looking at the config files but did not see where to change the default temp directory. Again I tried to substitute with absolute path /media/thumbdrive/orginal)_file, with single quotes.
Did try to use the LOAD option. Same results, which again does not rule out that using it might be right with something else missing.