Results 1 to 2 of 2

Thread: Global error mailing?

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    Global error mailing?

    Is there any way to include a file into all of my files that will email me any errors that are produced? Instead of doing error checking and adding an "or die" statement with the mail() function... can I catch any error that is thrown? Maybe through php.ini?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    You could set the auto_prepend_file directive in your php.ini which will define an error handler for all errors thrown during script execution. The errror handler will pick up the errors, collect them together in a variable and mail them off to you if neccessary at the end of the script.

    Here's some info on the functions/methods I'd use:

    http://uk.php.net/manual/en/function...or-handler.php - error handling to collect together a list of errors

    http://uk.php.net/manual/en/function...n-function.php - shutdown function to mail the error list
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width