Send error to email from php.ini

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beary
    New Member
    • Nov 2006
    • 170

    Send error to email from php.ini

    Using php 5
    I have access to my own php.ini file on the server

    I want to send any and all php errors to an email address

    I tried changing the line error_log = error_log to

    error_log = ("PHP error", 1, "myemail@mydoma in.com")

    but it hasn't worked. I basically just would like to know what my oho.ini file needs to have in order to send an email rather than logging to a file.

    thanks
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Originally posted by beary
    error_log = ("PHP error", 1, "myemail@mydoma in.com")
    according what I've seen on php.net this wouldn't work this way…

    anyways, you're able to log some error types through set_error_handl er() (mostly warnings, notices and user errors) and there you can certainly mail the errors.

    Comment

    Working...