Catching an error on line 0

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mikeym
Forum Newbie
Posts: 20
Joined: Sun Dec 16, 2007 8:07 am

Catching an error on line 0

Post 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?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Catching an error on line 0

Post by Christopher »

It is only a warning. See the manual for the error_reporting() or ini_set() functions.
(#10850)
mikeym
Forum Newbie
Posts: 20
Joined: Sun Dec 16, 2007 8:07 am

Re: Catching an error on line 0

Post 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?
mikeym
Forum Newbie
Posts: 20
Joined: Sun Dec 16, 2007 8:07 am

Re: Catching an error on line 0

Post 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.
Post Reply