UPLOAD_ERR_INI_SIZE PHP Origin: Application & API OSI layer 7 · Application Last updated 13 Oct 2026

PHP upload error 1: The uploaded file exceeds the upload_max_filesize directive in php.ini

The uploaded file is bigger than PHP’s upload_max_filesize, so PHP discarded it.

Exact message you may see exceeds the upload_max_filesize directivePOST Content-Length exceeds the limit
Seen on: PHP

Meaning

$_FILES['f']['error'] holds a code: 1 = over upload_max_filesize, 2 = over the form’s MAX_FILE_SIZE, 3 = partial, 4 = no file, 6 = no temp dir, 7 = can’t write to disk. If the whole POST exceeds post_max_size, $_FILES and $_POST are simply empty.

Common causes

  • upload_max_filesize too small (default 2M)
  • post_max_size smaller than the upload
  • Missing/unwritable upload_tmp_dir (codes 6/7)

⚡ Quick fix

  1. Raise upload_max_filesize and post_max_size (post ≥ upload)
  2. Check $_FILES['f']['error'] and show a friendly message
  3. Make sure the temp dir exists and is writable

Detailed fix by platform

PHP

  1. upload_max_filesize = 50M and post_max_size = 55M in php.ini or .user.ini

How to diagnose

  1. Code — Value of $_FILES[...]['error']
  2. Limits — phpinfo() upload/post limits

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1000 — Cloudflare Error 1000: DNS points to prohibited IP (Cloudflare)1000413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413AADSTS90002 — AADSTS90002: Tenant 'x' not found (Azure)AADSTS90002AH00558 — Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name (Nginx / Apache)AH00558api_version_invalid — API Error: Invalid or unsupported API version (API)api_version_invalidAzureWebJobsStorage — Azure Functions: Value cannot be null. (Parameter 'connectionString') / Missing value for AzureWebJobsStorage (Azure)AzureWebJobsStorageConnectionString property has not been initialized — InvalidOperationException: The ConnectionString property has not been initialized (.NET)ConnectionString prop…docker-credential-desktop — error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH (Docker)docker-credential-des…UPLOAD_ER…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.