No temp name specified when uploading files

I have a PHP script that processes uploaded files. It usually works fine, but sometimes I get errors while loading. when I check the array $_FILES, this is what I see:

File failed:

Array ( [Filedata] => Array (
      [name] => cbj2_web.pdf 
      [type] => 
      [tmp_name] => 
      [error] => 1 
      [size] => 0 ) )

File that worked:

Array ( [Filedata] => Array ( 
        [name] => tick.png 
        [type] => application/octet-stream 
        [tmp_name] => /tmp/phpL8oYLc 
        [error] => 0 
        [size] => 1108 ) )

I'm not sure what will go wrong or how to determine it exactly. This is the first step in processing the file, so I have no code that does nothing with the file.

Any suggestions?

+5
source share
2 answers

From http://php.net/manual/en/features.file-upload.errors.php :

Value: 1; The downloaded file exceeds the upload_max_filesize directive in php.ini.

, php.ini, upload_max_filesize .

+8

All Articles