Jump to content

max php file length


Walker33

Recommended Posts

I've got an enormous page for a pretty complex process.  I just posted some changes, and it stopped functioning.  Through multiple tests, I determined there was no problem with the code; it was just becomes too large at a certain point.  I've read about changing settings in the php.ini file, but I'm not exactly sure what to change or what to bump it up to to allow for this huge page.  Here are some current settings that I'm guessing control this problem:

 


max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

; Maximum size of POST data that PHP will accept.
post_max_size = 8M

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M


 

Does anyone have any insight into what to change or what settings might allow for a larger page?  Not sure which one of these settings controls my problem.  Thanks, as always, for any help.

Link to comment
Share on other sites

No, I've never heard of a script being too large to process, either.  It's 8,000 lines, though, which is larger than any other single page I've ever constructed.  I know it's not the code, because I kept cutting parts of it out to see where the failure was (figuring it was the code, even though I couldn't find my mistake), and when it failed, I took that code at the failure point, put it back in, and pulled other code.  Worked fine, then when adding the previously "working" code, it failed there.  I did that several times with several different pieces of the code, and all was fine until I hit a certain level.

 

So to answer the other question, no, I can't really post it.  It's enormous, and there's an awful lot of sensitive data there.  But I can say with certainty that it's not the code, so I'm assuming it's the size.  But maybe it's not the size?  Maybe it's the memory limit?  I'm not sure.

Link to comment
Share on other sites

Found the answer and just wanted to get it here for other people if they ever run across a similar problem.  Yes, it was a setting in the php.ini file, the memory_limit parameter.  I found in the server log that the allowed memory size was exhausted, so by moving the memory_limit up to 20, the problem was resolved.  Hope that helps someone else down the road.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.