$_FILES array is empting after reinstalling apache and Mysql. Please help!!!

Discussion in 'Apache' started by Snyper3xs, Oct 29, 2009.

  1. #1
    Hi guys.

    Here on my development machine I have a porblem with my $_FILES arrays that I cannot resolve. Returns and empty array that I cannot find a solution for. I have searched and tried many things without any success.

    Originally I had a old version of xampp installed. So U updated to the current one. That failed so I installed apache, mysql and php all from scratch and I still get an empty $_FILES array. All the latest versions installed yesterday

    Here is the code I am using for testing in a file called test.php.
    <html>
    <body>
    <?php
    echo 'file';
    print_r($_FILES);
    echo 'end';
    print_r($_POST);
    set_time_limit(0); 
    ini_set('upload_max_filesize', '100M');
    ?>
    <form action="test.php" method="post" encytype="multipart/form-data">
    		<input type="file" name="test_file" />
    		<input type="submit" />
    	</form>
    </body>
    </html>
    Code (markup):
    As you can see I have brought it down to its raw source.
    There are is only 1 form, the encytype="multipart/form-data" is included, it is posted. I have also checked all the relevant setting in the php.ini file to make sure they are correct.

    post_max_size = 8M
    file_uploads = On
    upload_tmp_dir = 'C:/php/tmp'
    upload_max_filesize = 2M

    PHP, apache and mysql all work fine and I am able to copy files to the temp directory. I am logged in with administrator right, I am the only person using this machine. My machine is running Vista.

    This is the results I get returned when I try to upload a standard jpg file.
    file array
    Array ( )
    post array
    Array ( [test_file] => IMG_8555.jpg ) 
    Code (markup):
    Can someone please provide some direction. I have no idea.

    Thanks
     
    Snyper3xs, Oct 29, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try
    print_r($_FILES['test_file']);
    PHP:
     
    chadsmith, Oct 29, 2009 IP
  3. Snyper3xs

    Snyper3xs Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That just returns nothing.

    file
    Array ( )
    post
    Array ( [test_file] => IMG_934.jpg )
    File test_file
    PHP:
    print_r($_FILES); should display the entire content of the $_FILES array.
     
    Snyper3xs, Oct 29, 2009 IP
  4. Snyper3xs

    Snyper3xs Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    bump. Had anybody got any ideas?
     
    Snyper3xs, Nov 4, 2009 IP