Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 807603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:25:36+00:00 2026-05-15T00:25:36+00:00

I am working on a PHP upload script and when testing my error checks,

  • 0

I am working on a PHP upload script and when testing my error checks, I attempted to upload a 17MB TIFF file. When I do this the $_FILES array is empty. The script works fine for what I need it to do, which is to upload JPEG files. My solution is to test if $_FILES is empty or not before continuing with the upload script.

Can anybody explain why $_FILES is empty when a TIFF is attempted to be uploaded? Is my solution, to check if $_FILES is empty or not, an okay one?

Does this have something to do with settings in php.ini?

Just to clarify

I was checking that $_FILES was empty using the following:

if(empty($_FILES))
{
    die('$_FILES is empty.');
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:25:36+00:00Added an answer on May 15, 2026 at 12:25 am

    Yes, upload_max_filesize controls max upload size, which the TIFF file most likely exceeded. The default is 2M. You can test with:

    echo ini_get("upload_max_filesize");
    

    EDIT: Actually, the exact cause is more likely post_max_size, which is always >= upload_max_filesize: “If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't understand why this is not working. It should be very easy. upload.php
We currently have a working php mail script, this works fine and as we
Using this upload script and it was working ok a week ago but when
I am using php script to upload file on some ftp server. When I
I am working on an upload script. If a user uploads a file and
I use this simple script to build a simple image upload form - http://www.w3schools.com/PHP/php_file_upload.asp
I got this php uploading script which is working fine on Mozilla, Chrome, Opera,
I am working on a PHP upload script which allows uploading only PDF files.
I have an upload PHP script and before it uploads the file, it renames
I'm working on an image upload script with PHP, I found one someone was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.