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 8406185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:02:11+00:00 2026-06-09T23:02:11+00:00

Possible Duplicate: POST Content-Length exceeds the limit PHP Warning: POST Content-Length of 113 bytes

  • 0

Possible Duplicate:
POST Content-Length exceeds the limit
PHP Warning: POST Content-Length of 113 bytes exceeds the limit of -1988100096 bytes in Unknown

I have form for upload images, I testing and if I upload image, where have for example 9 mb size, php returns error:

POST Content-Length of 10194008 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I want that dont upload files more than 2 mb, in first line I have this code:

if (!empty($_FILES['main_photo']['name'])) {

    if ( $_FILES['main_photo']['size'] > 1024 * 1024 * 2 ) {
        header("Location: index.php");
        exit();
    }
}

but this error still displayed, please tell what make, I want if file more than 2 mb, just:

header("Location: index.php");
  • 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-06-09T23:02:12+00:00Added an answer on June 9, 2026 at 11:02 pm

    The file you are trying to upload is larger than the configured size set in php.ini. Go inside of php.ini and modify these values to 2mb or greater to allow larger uploads:

    upload_max_filesize
    post_max_size <-- This one appears to be your biggest issue
    

    Then your code should work.

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

Sidebar

Related Questions

Possible Duplicate: Read Post Data submitted to ASP.Net Form I have a google checkout
Possible Duplicate: JavaScript post request like a form submit I have a value calculated
Possible Duplicate: Avoid resending forms on php pages Index.html <form method=post action=demo.php> <input type=text
Possible Duplicate: how to get GET and POST variables with JQuery? I have the
Possible Duplicate: PHP detecting request type (GET, POST, PUT or DELETE) This should be
Possible Duplicate: How secure is a HTTP POST? Suppose I have a login page
Possible Duplicate: Undefined Index when using post I'm a beginner php developer and I'm
Possible Duplicate: php $_POST array empty upon form submission I just make a simple
Possible Duplicate: PHP URL encoding retaining invalid url characters I use a form similiar
Possible Duplicate: Correctly encode characters in a PHP mail form (“I'm” turns to be

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.