very large page fails when user posts query

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
rbarnett
Forum Newbie
Posts: 5
Joined: Wed Feb 27, 2008 10:03 am

very large page fails when user posts query

Post by rbarnett »

I have a problem with a very large php page that is 25 MB. It's purpose is to do a select query of records from a PostgreSQL database. The page successfully loads in the browser but when users try to Post or submit, the page fails often with a white screen or if they're lucky it will take 10 minutes to process. But it usually results in a white screen. There are 20,000 + items on the page so it is a big post.. We tried setting the memory_limit in the php.ini file as high as 80 MB from the default 8 MB but with no change.

Any help would be much appreciated. Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: very large page fails when user posts query

Post by Christopher »

25 MB and 20,000 fields. This is simply not possible with HTTP. You are pretty obviously doing something crazy. If you need to get 25 MB from the client to the server with a web app -- I would recommend using file upload instead.
(#10850)
rbarnett
Forum Newbie
Posts: 5
Joined: Wed Feb 27, 2008 10:03 am

Re: very large page fails when user posts query

Post by rbarnett »

Sorry, I probably need to clarify. The php file is only 180 K. If in the rare instance that a user is able to post data to the server correctly hitting the submit button (which will take 10 minutes or more) the file is 25 MB in size if you do a save as and download the file.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: very large page fails when user posts query

Post by Christopher »

I'm still not clear. Is the 25 MB of data in the entire database, being downloaded, in one form field, in many form fields, or being uploaded?
(#10850)
rbarnett
Forum Newbie
Posts: 5
Joined: Wed Feb 27, 2008 10:03 am

Re: very large page fails when user posts query

Post by rbarnett »

Sorry for the confusion. The 25 MB is the size of the post displaying in many form fields. I think because the size of the post is so large the user usually gets a white screen instead of having the query return successfully. We tried changing the post_max_size to 80 M with no luck. I double-checked the php.ini file and the max_execution_size is 30, the memory_limit is 8 M and the post_max_size is 80 M.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: very large page fails when user posts query

Post by Christopher »

Still not clear what "the size of the post displaying in many form fields" means? It that the size of the page you send to their browser? Is that the total amount of text entered into the form text/textarea fields? Or are you uploading a file?
(#10850)
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: very large page fails when user posts query

Post by liljester »

so.. you post some data from a from, and the server replies with 25mb of stuff back to the browser?

25mb of data is a horrifying amount of data to send to a browser, you should look into a way to do it thats a little more efficient... pagination maybe?
rbarnett
Forum Newbie
Posts: 5
Joined: Wed Feb 27, 2008 10:03 am

Re: very large page fails when user posts query

Post by rbarnett »

I'll look into pagination. That's a good idea. Thanks
Post Reply