Page 1 of 1

Catching an error on line 0

Posted: Mon May 05, 2008 3:11 am
by mikeym
OK, so I'm getting the following error:

Warning: POST Content-Length of 11373910 bytes exceeds the limit of 10485760 bytes in Unknown on line 0

Now this is on a hosted site so I can't change any of the PHP settings and the security is set to paranoid. Is it possible to trap this error so that users aren't left hanging with a error instead of the page they're supposed to have?

Re: Catching an error on line 0

Posted: Mon May 05, 2008 3:22 am
by Christopher
It is only a warning. See the manual for the error_reporting() or ini_set() functions.

Re: Catching an error on line 0

Posted: Mon May 05, 2008 4:46 am
by mikeym
Thanks for the reply however how can I set error_reporting() when the error is on line 0 of the script? I've tried setting it on the page that has the form on it but that didn't seem to work.

I could try using ini_set() but I don't know what variable to set and am not finding anything with a search. (Also because of the paranoid settings on my host when I've tried setting a variable with ini_set() it's not worked.)

Could someone advise me as to what to set?

Re: Catching an error on line 0

Posted: Mon May 05, 2008 5:23 am
by mikeym
Hmmmmmmm.....

Doesn't look good.

I've tried the following on the page with the form:

ini_set('error_reporting', E_ERROR | E_PARSE);

And I still get the same warning.