Thanks for all the info, everyone! Seems like the @ trick is nice
for individual lines, but turning off/on every time may be bit much
on a complicated page. The ini_set('display_errors', false); also has
a hit, as it turns back on after the entire script has run, but seems
the easier way a
9el wrote:
Intead of displaying errors to page. Its better to use error log file.
I believe by default they are sent to the server error log file
regardless of your error report setting.
It wouldn't surprise me if there's a slick class out there for parsing
the error log and extracting php
Intead of displaying errors to page. Its better to use error log file.
And as @ error suppressors are expensive its always better if you can avoid
using them.
I'd also suggest the ZCE(Zend Certification Engineer) Exam Guide for this
matter for best practices.
Regards
Lenin
www.twitter.com/nin
2009/4/7 Chris :
> Igor Escobar wrote:
>>
>> Becarefull, error supression is slow.
>
> If it's the only way to stop an error from showing up, what's the problem?
>
> php will still generate the warning/notice even if display_errors is
> disabled - which will be even slower.
>
> Plus I never said us
It's just an observation ;)
If you have to use it or not, you have to decide better way.
Regards,
Igor Escoar
Systems Analyst & Interface Designer
--
Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar
On Mon, Apr 6, 2009 at 9:56 PM, Chris wr
Igor Escobar wrote:
Becarefull, error supression is slow.
If it's the only way to stop an error from showing up, what's the problem?
php will still generate the warning/notice even if display_errors is
disabled - which will be even slower.
Plus I never said use it everywhere, I said use it
Becarefull, error supression is slow.
Regards,
Igor Escoar
Systems Analyst & Interface Designer
--
Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar
On Mon, Apr 6, 2009 at 8:38 PM, Chris wrote:
>
> but they give the following warning:
>
but they give the following warning:
"This is a feature to support your development and should never be used on
production systems (e.g. systems connected to the internet)."
Am unclear what that means - is it okay to add:
It's about "information disclosure".
Errors/warnings/notices
Hi all! Have a question about hiding PHP errors from the end user.
I have the following lines:
$fp = fsockopen ($host, 80, $errno, $errstr, $timeout);
if (!$fp) {
// problem, put error handing code here
} else {
// success, do whateve
9 matches
Mail list logo