Broadband
Dial-Up
Email
Hosting
Wireless
Security
Useful Tools
Quick Reference
Contact Us
Customer Portal
Site Search

Zen Internet Support Forum

Welcome to the Zen Internet community support forums.

Before posting we recommend you search our
extensive Knowledge Base or the forum archives
as an answer to your query may already be available.

Welcome to Zen Internet Support Forum Sign in | Join | Help
in
Forums Forum Rules

PHP Error Logging

Last post 16-08-2007, 12:43 AM by ajho. 1 replies.
Sort Posts: Previous Next
  •  02-04-2007, 5:31 AM 25587

    PHP Error Logging

    Hi, I have no trouble using email error logging with PHP however when I use the file logging I do not get any errors sent to: Control Panel/Statistics/Error Log

     
    Email of error sent OK

    error_log('Failed to connect to MySQL database: ' . mysql_error(), 1, "xxxx@gmail.com", "From: xxxx@gmail.com");

     

    NO OUTPUT TO Control Panel/Statistics/Error Log
    error_log('Failed to connect to MySQL database: ' . mysql_error(), 0);

     

    I am wondering if I am looking in the correct file for the PHP errors? 

    Thanks for any help 

    Chris 

  •  16-08-2007, 12:43 AM 27913 in reply to 25587

    Re: PHP Error Logging

    Hi. My site's not hosted on Zen so the set up may be different, but I get the same symptoms.

    Control Panel/Statistics/Error Log appears only to show the Apache web server errors not the PHP ones. I prefer to have PHP errors emailed to me anyway, so I've not tried very hard to get it working with the $message_type set to 0.

    From the documentation it would appear to to depend on the error_log directive so check in phpinfo(). There is also mention of a syslog() function which looks promising.

     


    Ant

    ---------------------------------------------------------
    Visit www.strollingguides.co.uk
    for photos and articles from Britain and around the world
    ---------------------------------------------------------
View as RSS news feed in XML