FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » about nntp.php and error_log
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
about nntp.php and error_log [message #9789] Wed, 23 April 2003 18:04 Go to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

i run nntp.php in cron as suggested

i noticed that when it succeeds, cron sends me a mail with the result
when it fails, error messages are put in error_log

but i'd like to get a mail from cron when it fails, that's more convenient

what do i need to do to make it work this way ? thanks
Re: about nntp.php and error_log [message #9851 is a reply to message #9789] Sat, 03 May 2003 02:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm, make php errors go to stdout, that way the'll be sent to you via cron as well.

FUDforum Core Developer
Re: about nntp.php and error_log [message #9854 is a reply to message #9851] Sat, 03 May 2003 03:23 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

prottoss wrote on Sat, 03 May 2003 10:25

Hmm, make php errors go to stdout, that way the'll be sent to you via cron as well.


which one should i modify, nntp.php or cron?

i don't know much about cron or stdout, but i can google for help

if it's about the nntp.php, i am afraid i can't do it myself

thanks
Re: about nntp.php and error_log [message #9941 is a reply to message #9854] Tue, 13 May 2003 14:02 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm actually if there are php errors they will go to stdout, as far as forum errors. You need to modify the exit_handler() method inside nntp.inc and make it print the errors not only to a file but to stdout like this:
<?php
$fp 
fopen("php://stdout""w");
fwrite($fp$this->error);
fclose($fp);
?>


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help with groups
Next Topic: Mailing list - create a specific message
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 05:59:30 GMT 2024

Total time taken to generate the page: 0.02649 seconds