php-windows Digest 1 Oct 2004 15:57:44 -0000 Issue 2416

Topics (messages 24678 through 24678):

File Upload problem
        24678 by: Scott Carr

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- I am trying to use File Upload in PHP 5.0.2.

The file is showing up without error, as you can see in the array:

Array
(
   [fielddelim] => comma
   [Save] => Continue
   [MAX_FILE_SIZE] => 8388608
   [uploadfile] => Array
       (
           [name] => largeimport.csv
           [type] => application/octet-stream
           [tmp_name] => c:\winnt\temp\php2B.tmp
           [error] => 0
           [size] => 97826
       )

)


When I run is_uploaded_file($values['uploadfile']['tmp_name']), I am getting an error saying the file is not an Upload File.


Log Entries around the problem:
[01-Oct-2004 10:58:05] PHP Notice: Tmp File: c:\winnt\temp\php2B.tmp in C:\Apache2\htdocs\client\import.php on line 112
[01-Oct-2004 10:58:05] PHP Warning: File Upload failed in C:\Apache2\htdocs\client\import.php on line 116


Code in question:
if (is_uploaded_file($values['uploadfile']['tmp_name'])) {
move_uploaded_file($values['uploadfile']['tmp_name'], "{$GLOBALS['strCODir']}temp\\{$values['uploadfile']['name']}");
} else {
trigger_error('File Upload failed', E_USER_WARNING);
}



I am using QuickForm to build the form. This has worked before, but not on this system. Is there something I am missing?


Thanks

--
Scott Carr
OpenOffice.org
Documentation Maintainer

--- End Message ---

Reply via email to