Store PHP Errors in Database

Discussion in 'PHP' started by FishSword, Jun 4, 2011.

  1. #1
    Hiya ;),

    Is it possible to store PHP error messages in a MySQL database?

    Many Thanks,

    FishSword
     
    FishSword, Jun 4, 2011 IP
  2. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #2
    I'm not sure why you would like to do this. If configured, PHP will log PHP errors to your server's error.log file. (Apache)
     
    Sky AK47, Jun 4, 2011 IP
  3. MarPlo

    MarPlo Member

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    48
    #3
    Hy,
    You can use try..catch statement to capture the error in a variable, then to use it as you want.
    Look on the net for "try catch php".
     
    MarPlo, Jun 4, 2011 IP