Walker33 Posted May 13, 2011 Share Posted May 13, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236359-max-php-file-length/ Share on other sites More sharing options...
trq Posted May 14, 2011 Share Posted May 14, 2011 Iv'e never heard of a PHP script being too large to process, there is more likely a problem with your code. Quote Link to comment https://forums.phpfreaks.com/topic/236359-max-php-file-length/#findComment-1215238 Share on other sites More sharing options...
Orionsbelter Posted May 14, 2011 Share Posted May 14, 2011 Can you post the code? how many lines is it? Quote Link to comment https://forums.phpfreaks.com/topic/236359-max-php-file-length/#findComment-1215245 Share on other sites More sharing options...
Walker33 Posted May 14, 2011 Author Share Posted May 14, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236359-max-php-file-length/#findComment-1215281 Share on other sites More sharing options...
Walker33 Posted May 18, 2011 Author Share Posted May 18, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/236359-max-php-file-length/#findComment-1217183 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.