SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    0 Post(s)
    0 Thread(s)

    $_FILES array missing type,tmp name, size - error 6

    I have a script that uploads a jpg from a form. PHP handles the form

    The image is stored in a folder and I have permissions

    the script works great on my old computer (xp-pro) and on the apache server

    the script does not work in new computer / new PHP install / Vista OS

    This is what displays from the local server / vista / IIS7
    debugging info:
    Array ( [img1] => Array ( [name] => Desert Landscape.jpg [type] => [tmp_name] => [error] => 6 [size] => 0 ) )

    This is the correct display from the Apache server
    debugging info:
    Array ( [img1] => Array ( [name] => Autumn Leaves.jpg [type] => image/pjpeg [tmp_name] => /tmp/php6nXuLM [error] => 0 [size] => 276216 ) )

    I am missing file tmp name, file size, file type --- only the name is in the array.
    also the script throws an error 6 - tmp folder not found

    I have tried various folders and the permissions is set to read write.

    the php.ini --
    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    upload_tmp_dir = c:\tmp\

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 20M

    Any idea what the problem might be?
    I have checked the php.ini and it seems all the options needed are available and unremarked

    I have the mbstring before the efix in the PHP.ini file

    been at this for 6 days and any help would be appreciated!!!


  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    8 Post(s)
    0 Thread(s)
    I could not tell you whats wrong, but this is one of the reasons why I went back to XP to have a working development environment.

    the error it is sending is:
    UPLOAD_ERR_NO_TMP_DIR = Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.

    So you need to change upload_tmp_dir = c:\tmp\ to a valid location ot make tmp in the c drive.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts