Bluehost.com Web Hosting $6.95

error reporting

This is a discussion on error reporting within the PHP General forums, part of the PHP Programming Forums category; If I use: ini_set("error_reporting", 0); ini_set("display_errors", 0); It still shows the errors.. if I ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2003
Richard Baskett
 
Posts: n/a
Default error reporting

If I use:

ini_set("error_reporting", 0);
ini_set("display_errors", 0);

It still shows the errors.. if I use the error_reporting function.. it still
shows the errors, no matter what I do.. it still shows the errors!

What am I missing? I have it set in the php,ini to show errors, but I want
to be able to suppress them within the individual scripts, but it's not
working.. and when I use ini_get() it shows their values to be what I just
set them to be, but yet.. it is still showing the errors! Ugh :(

Help!

Rick

"Every person you meet - and everything you do in life - is an opportunity
to learn something." - Tom Clancy
Reply With Quote
  #2 (permalink)  
Old 10-17-2003
John W. Holmes
 
Posts: n/a
Default Re: [PHP] error reporting

Richard Baskett wrote:
> If I use:
>
> ini_set("error_reporting", 0);
> ini_set("display_errors", 0);
>
> It still shows the errors.. if I use the error_reporting function.. it still
> shows the errors, no matter what I do.. it still shows the errors!
>
> What am I missing? I have it set in the php,ini to show errors, but I want
> to be able to suppress them within the individual scripts, but it's not
> working.. and when I use ini_get() it shows their values to be what I just
> set them to be, but yet.. it is still showing the errors! Ugh :(


What kind of errors? Ths will not prevent parse errors from being shown.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
Reply With Quote
  #3 (permalink)  
Old 10-17-2003
Richard Baskett
 
Posts: n/a
Default Re: [PHP] error reporting

on 10/16/03 16:51, John W. Holmes at holmes072000@charter.net wrote:

> Richard Baskett wrote:
>> If I use:
>>
>> ini_set("error_reporting", 0);
>> ini_set("display_errors", 0);
>>
>> It still shows the errors.. if I use the error_reporting function.. it still
>> shows the errors, no matter what I do.. it still shows the errors!
>>
>> What am I missing? I have it set in the php,ini to show errors, but I want
>> to be able to suppress them within the individual scripts, but it's not
>> working.. and when I use ini_get() it shows their values to be what I just
>> set them to be, but yet.. it is still showing the errors! Ugh :(

>
> What kind of errors? Ths will not prevent parse errors from being shown.


Ok I figured it out.. All I needed was for you to tell me exactly what you
told me, so that I could explore other options instead of just thinking I
was doing something wrong :)

So what I did was set error_reporting to E_PARSE and then display_errors to
On since I found out that I couldnąt change the status of display_errors
either, but I can change error_reporting within my scripts.. so that's what
I did :)

Thanks for that help!

Rick

To realize the worth of the anchor we need to feel the storm. - Unknown
Reply With Quote
  #4 (permalink)  
Old 10-17-2003
daniel@electroteque.org
 
Posts: n/a
Default Re: [PHP] error reporting

on the topic of error reporting, am i able to catch fatal/parse errors yet ?
Reply With Quote
  #5 (permalink)  
Old 10-17-2003
John W. Holmes
 
Posts: n/a
Default Re: [PHP] error reporting

daniel@electroteque.org wrote:

> on the topic of error reporting, am i able to catch fatal/parse errors yet ?


How could a PHP script catch a Parse Error? The script hasn't started
because there is, ummm, a Parse Error! :)

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
Reply With Quote
  #6 (permalink)  
Old 10-17-2003
daniel@electroteque.org
 
Posts: n/a
Default Re: [PHP] error reporting

> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


Heh yes umm i know this. But how i could i catch this before is spits out
to an ugly error page so i can send to a custom error page.
Reply With Quote
  #7 (permalink)  
Old 10-17-2003
Mike Migurski
 
Posts: n/a
Default Re: [PHP] error reporting

>Heh yes umm i know this. But how i could i catch this before is spits out
>to an ugly error page so i can send to a custom error page.


Why would anyone but you ever see a parse error? It's the sort of thing
you fix before setting up custom error handling. :)

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:16 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0