During installation of this script it ask me to set up a cron job. The instructions had me set it to every minute. If I do that then I get an email every minute which is not acceptable. This is surely not the intention. I know I need this cron for the site to do some features but what am I missing? They can not expect to receive thousands of emails every day. So, I just never completed this part of installation until I learn more about. Now I have a mod that says that cron has to function for the mod to work to email unconfirmed accounts every "x" amount of days.
Anyone clear this up for me?
|
cron only send a single mail everyday that is a periodic report. You must be getting some error mails you should correct that error and mail will stop. so much to do.... |
Oh I get it. You're not actually receiving the emails, you are reading it wrong.
The cron sets up to check every minute to see if it needs to run. That does not mean it will send you an email every minute. It will only send an email if the cron is triggered. That will only happen if there's a problem.
http://towtalk.net ... Hosted by Zarconia.net! |
I will try again and see what I get.. The problem was that I was actually getting emails every minute. Let me do this again. I just know the installation said to set the cron up to ***** <- all asterisks which basically means every minute. The installation even mentions it will fire every minute.. Like I said I will try again. |
If you're getting emails every minute, it means something is wrong. If you get another email, show us the message. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Ok here is the latest. This is my problem right now. The cron is returning the error message to my email every minute saying that register globals is on and needs to be off. Because of my current hosting needs I need globas on for some domains and off for others. What I do is manually turn globals off via each directory with a php.ini file which is included in the periodic folder. What I guess is happening is maybe the cron.php file triggers other directories that globals are not turned off in and gives me this message? If so then which directories do I need to check? |
In the cron.php file I see the file requiring the /inc/ directory and maybe the BX directory inside the classes folder. I tried getting register_globals = Off in the /inc/ directory but I get an error message telling I can not create new files in that directory so I am currently consulting with my hosting provider as to why that is. I assume I am probably not on the right path but unless I can get globals off in the directories the cron.php file appears to communicate with then I wont be able to continue testing. |
Ok I got the register globals issue taken care of. It queued up a couple old emails I made and sent them. Then sent me the periodic report. Now my problem is that I keep getting this every minute.
X-Powered-By: PHP/5.2.17 Content-type: text/html
|
Two things, I'm not sure how helpful either one of them will be but here goes nothing:
1. If you need register globals turned on on your server you need to make SURE those other scripts that require it are locked down TIGHT. It allows people to exploit weak scripts.. that's why Dolphin requires it to be turned off.
2. You can stop the emails by adding this to the end of the cron command:
>/dev/null;
It won't fix whatever is causing them to be sent out, it will just send them to never never land so your inbox won't be full. If you use this you won't get any emails from the cron at all, good or bad. Not a fix, just a bandaid.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
@mscott
That is pretty helpful really. The only thing is that I do not know what kind of emails the cron may send me. As of now it just sent me an email letting me know my newsletter emails in que were sent out. I could care less if I get that email or not. So I think that "band aid" would work fine. I do not need confirmation for things like that really. Let me try this. To clarify on your #1 comment though I ended up turning off Register globals for the entire server. It did mess up an older site I made which I decided to shut down shortly anyway. I was aware of the risk and though I have maintained no security issues over the years the information contained in the script was not worth the risk of being compromised.
Thanks again. I will try this and see what happens.
|
Ok its done. That was a better fix than you thought. I no longer get the emails every minute. However, I still get all the emails the cron is supposed to send such as newsletter confirmations, etc. As of now its perfect for what I needed. Thanks everybody and super thanks to mscott! |
Awesome! Glad I could help. I've been sitting here racking my brain trying to figure out how the other cron emails are still being sent. I think I figured it out. That command I gave you prevents any output from the command you put it on.. so the actual cron.php output is sent to no where. So that's why it stopped those weird once a minute emails with the php info in them. The other emails come from other files that the cron.php is actually executing so their output isn't being blocked. So it does work out pretty good.
The emails that are cron related are:
Mass email notifications (like you've seen)
Database clean up summaries (once a day around midnight)
ffmpeg video conversion notifications whenever someone uploads a video.
The best I can tell the only one you might not get with the command I gave you is the database clean up one at midnight, I'm not sure though.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Thanks for that clarification. Really happy with the turn out. Now I am going to go install this mod to email unconfirmed profiles as a reminder to activate. |
tradeiswear 8 Feb 2012 ·
post is hidden (
show post
)
|
tradeiswear 8 Feb 2012 ·
post is hidden (
show post
)
|
This just stopped working for some reason.. I woke up today to 783 emails and this is what shows in my message.
/bin/sh: line 1: 2758 Segmentation fault php /home/www/mysite.com/periodic/cron.php > /dev/null
|
The issue in my last post has been fixed. It was all server side issues. I had some conflicting issues that all started when I started using the APC caching system. Still working on 100% fixing all this.. |