1

Possible Duplicate:
No log handling enabled - turning on stderr logging Cannot find

I'm trying to setup a Cron Job that runs a .php file that will automate client email correspondence. I've created the .php file and the Cron Job through cPanel. Everything works fine in that I'm getting my test email as I require it when I require it, but I'm also getting an additional server email on every send with the following content:

No log handling enabled - turning on stderr logging Cannot find module (MTA-MIB): At line 1 in (none) Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)

The Cron Job is as follows:

0.3 * * * * php -q /home/USERNAME/public_html/cron/test.php 

I've done research on this site and couldn't find a solution. I've also chatted with my hosting company and believe it or not his best advice was to refer me to this site.

3
  • stackoverflow.com/questions/1012238/… No closing answer there though... Commented Aug 11, 2011 at 6:29
  • Pelshoff - Thanks for the snappy reply. I did go through that post yesterday and can't find an answer though. I'll keep an eye on that one. Commented Aug 11, 2011 at 7:02
  • Dan - Also thanks for the quick reply. I'll take a look at serverfault and see what I can find. Commented Aug 11, 2011 at 7:03

2 Answers 2

1

Based on this post it looks like you have snmp enabled in your php install, but you don't have the underlying snmp software. If you install the net-snmp package on the machine that should fix the problem.

Alternately, you could edit your php.ini file and remove the snmp modules, as you probably aren't using them anyway.

If however you can do neither of those things (because you don't control the server) then you might have to just live with the error emails. You can always just redirect them the the bitbucket.

However, I would hope that if you point this problem out to your hosting provider, they would be willing to at least fix the php.ini on the system to not load the snmp modules.

0

Try log output to a file using echo in your code. It might work.

0.3 * * * * php -q /home/USERNAME/public_html/cron/test.php >> /home/USERNAME/log/email.log 
1
  • Hi Regnar, Thanks for your quick reply. I've done as suggested and the log file remains empty. If I echo some test text in the script file this is then written to the log file but still no solution as to why I'm getting this error email Commented Aug 11, 2011 at 7:31

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.