NotionCommotion Posted February 18, 2015 Share Posted February 18, 2015 What might be causing this error? How would you recommend troubleshooting? Thanks [Tue Feb 17 13:34:32 2015] [error] [client 11.22.33.44] PHP Warning: Unknown: POST Content-Length of 97807773 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://foo.bar.example.com/administrator/index.php?cid=2&controller=buy&id=1949621100 Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted February 18, 2015 Share Posted February 18, 2015 (edited) Need to raise the post_max_size in php.ini to higher than 8M 93.27 MB seems like a large amount for a post Edited February 18, 2015 by QuickOldCar Quote Link to comment Share on other sites More sharing options...
Csharp Posted February 18, 2015 Share Posted February 18, 2015 Maybe sharing the problematic code would actually help troubleshooting this. It's kinda hard to know what you're doing wrong if we don't know what you're doing in the first place. Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted February 18, 2015 Author Share Posted February 18, 2015 Maybe sharing the problematic code would actually help troubleshooting this. It's kinda hard to know what you're doing wrong if we don't know what you're doing in the first place. That is the issue. I don't know what the problematic code is. It is just a line in my error log. Line 0? What is line zero? What file did the error occur in? All my other log entries look something like the following, and I have a clue where to start looking: [Mon Feb 16 10:48:09 2015] [error] [client 22.33.444.555] PHP Fatal error: Call to undefined method com_maintainance_controller_default::save() in /var/www/example/application/classes/site_frontback.php on line 150, referer: https://foo.bar.example.com.com/index.php?cid=22&preview=640030448 Need to raise the post_max_size in php.ini to higher than 8M 93.27 MB seems like a large amount for a post Again, don't want to needlessly increase some parameter until I know what is causing it. Quote Link to comment Share on other sites More sharing options...
CroNiX Posted February 18, 2015 Share Posted February 18, 2015 Well, what are you POSTing? Is it from a form? Some dynamic AJAX? What is so large that is being sent in POST? We have no idea what's causing it either as you haven't provided any code to go on other than an error message which states you are POSTing too much data for your current post_max_size setting. So the answers addressed that point. Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted February 18, 2015 Author Share Posted February 18, 2015 CroNiX, As far as I know, I am not posting anything which is causing this error. I just looked in my error log and saw the message. Maybe someone is hitting my server using cURL, and it isn't me at all. But if someone is and it is causing php errors, I should at least know the nature of the error and it's potential impact, agree? It seems like the clue is in Unknown on line 0, where normally I see in /var/www/example/application/classes/site_frontback.php on line 150. What could cause the filename from showing up as Unknown and the line as showing up as 0? Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted February 18, 2015 Author Share Posted February 18, 2015 Turns out it was something I was doing. Using an older version of FineUploaderBasic (xhr streaming file uploading) caused the warning. The file was uploaded so I didn't know there was an error. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted February 19, 2015 Share Posted February 19, 2015 the error contains that information (or lack of) because it's occurring before php passes control to any of your php scripts. the content size header is sent by the client to the web server at the start of the request. when the size is greater than the post max size setting, an abort response is sent back (for those clients that observe the response) to try and prevent the client from sending the too large of a file, then php processes the uploaded file, setting the $_FILES array values based on the result of the upload. php then passes control to the .php page that was requested. that's all the information that php has at the point where that error was detected. it would be up to your form processing code to detect when the upload didn't work and take an appropriate action. exceeding the post max size setting will result in empty $_FILES and $_POST arrays and can specifically be detected by checking the $_SERVER['CONTENT_LENGTH'] (which would be in bytes) vs the post_max_size setting (which may be in abbreviated notation, i.e. 20M.) 1 Quote Link to comment 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.