1

I am trying to pass a very large array from html to php. After converting to a string, it is too large to pass to a php via POST. My overall goal is to save the variable to a server-side file. Any tips for methods? Thanks in advanced.

user1340052
  • 1,157
  • 2
  • 7
  • 9
  • Maybe you can change POST limit: see [this question](http://stackoverflow.com/questions/2364840/what-is-the-size-limit-of-a-post-request) – fusion3k Feb 05 '16 at 02:49
  • I believe it's the URL limit that is the problem. – user1340052 Feb 05 '16 at 02:51
  • 1
    POST can handle a very large amount if u configure php setting to do so. – Won Jun Bae Feb 05 '16 at 02:51
  • Is there a way to POST something from html to php while not getting the variable through the URL? – user1340052 Feb 05 '16 at 02:53
  • @user1340052 what does it mean “the URL limit”? – fusion3k Feb 05 '16 at 02:53
  • "Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs." -From Adobe.com – user1340052 Feb 05 '16 at 02:59

1 Answers1

4

When using POST method you are not passing data through URL, that's GET method. If you are passing data through POST and it's too big then you can increase pass through limit with the following flags in .htaccess.

post_max_size - What is the size limit of a post request?

max_input_vars - max_input_vars limited in PHP 5.2.17

upload_max_filesize - How to set upload_max_filesize in .htaccess? (just in case)

Difference between POST and GET - What is the difference between POST and GET?

I think that should set you on the right path. Also, keep in mind this should all work locally but if you're using free hosting provider these limits may not be changed without contacting support.

Community
  • 1
  • 1
dchayka
  • 1,201
  • 11
  • 19