Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error supressed?

    hi

    is there any way to stop error/warning appearing on php page.?

    Like the parse errors ....permission error...?
    so that script with error is not executed and to the user nothing ever went wrong on that page??

    is it possible ?
    Move on....

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Usually adding an "@" symbol in front of a function call will do it.

    Otherwise, check out the error reporting info on the php.net site. There are config directives you can change on the fly.
    ( http://www.php.net/manual/en/functio...-reporting.php )

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya thanks for the page

    so i can turn off the error reporting
    nowto the visitor no error shows up but
    is there someway that if the error happens an email alert is sent at a specified email address...to admin only?

    // Turn off all error reporting
    error_reporting(0);

    how can i send the error occured in email to the admin only?
    Move on....

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,095
    Thanks
    11
    Thanked 101 Times in 99 Posts
    you can define your own error handling rules with PHPs custom error handling
    http://be.php.net/manual/en/ref.errorfunc.php

    note you could also trap errors in your code i.e.

    PHP Code:
    <?
    @mysql_query($sql);
    if(
    mysql_error()){
        
    mail("admin@blah.com" ... etc
    }
    ?>
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •