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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:02:07+00:00 2026-05-31T07:02:07+00:00

I’m trying to send POST data that is 2 million characters big (non-binary string)

  • 0

I’m trying to send POST data that is 2 million characters big (non-binary string) via ajax (jQuery) and it always comes up as blank on the PHP side. Here is my code:

var string = "<data string that is 2M chars long>";
$.ajax({
    cache: false,
    type: 'POST',
    url: 'data.php',
    data: {'data_string': string}
});

On the PHP side, I get the following error message (when trying to retrieve data from $_POST['data_string']):

Notice: Undefined index: data_string in data.php on line ...

I’ve checked the post_max_size in php.ini, and it’s set at 256M which should be more than enough? I’m stumped and not sure what I’m doing wrong…

EDIT: If I make "string" a small amount of data (e.g. var string = 'test') then $_POST["data_string"] returns test, as expected. So I’m wondering if there’s some sort of data limit I’m reaching in Apache2, PHP or the browser itself? I’m using Google Chrome 17.0.963.79

EDIT2: memory_limit = 256M in php.ini

EDIT3: max_input_time = -1 in php.ini

EDIT4: var_dump($_POST) returns Array(0)

EDIT5: running the latest stable version of PHP5 on debian squeeze: PHP 5.3.3-7+squeeze8 with Suhosin-Patch (cli) (built: Feb 10 2012 14:12:26)

  • 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-31T07:02:10+00:00Added an answer on May 31, 2026 at 7:02 am

    You’ll have to check the limits parameters on all items between you and the server. Quite hard for proxy servers if any, but at least you can check:

    Apache:

    • LimitRequestBody, around 2Gb by default, maybe greater for 64bits, check error logs for details.

    PHP:

    • post_max_size which is directly related to the POST size
    • upload_max_filesize which may be unrelated, not sure
    • max_input_time, if the POSt takes too long
    • max_input_nesting_level if your data is an array with a lot of sublevels
    • max_execution_time, but quite sure it’s not that
    • memory_limit, as you may reach a size exceding the subprocess allowed memory
    • max_input_vars, if your data array has many elements

    If you have reached the compiled in limit for Apache your only solution is to avoid direct POSt of such a big chunk of data, you’ll have to break it into pieces.

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

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.