CodingCrontab

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  andy  
 To:  ALL
30463.1 
What am I doing wrong here?

code:
* 10 * * * /usr/local/psa/admin/bin/php /var/www/vhosts/mobil1.eu/httpdocs/admin/test3.php >/dev/null 2>&1


Paths to PHP and to the script are right, and all the script does is change a flag in a DB just to prove to me that it works (am just testing at the moment). Can I not use include()d files in the PHP scripts I call maybe?

(ignore the time, I realise that's set to run every minute at 10AM every day, it's just that I was testing it at 10AM)
0/0
 Reply   Quote More 

 From:  Matt  
 To:  andy     
30463.2 In reply to 30463.1 

Which user is the cron job running as?

 

That path you have there that says psa in it. Is that PSA as in Plesk because if it is you have a web interface to cron in the Plesk Control Panel which allows you to choose which user to run it as and other such malarky.

doohicky

0/0
 Reply   Quote More 

 From:  andy  
 To:  Matt     
30463.3 In reply to 30463.2 
Plesk indeedy. Was setting it through the specific domain's cron section which doesn't have a choice of user.. have now set it in the server's cron section under the 'root' user (at * 16 * * *), but it's still not working. That right?
0/0
 Reply   Quote More 

 From:  Matt  
 To:  andy     
30463.4 In reply to 30463.3 

Is cron running?

 

Should be able to check under System Services in Plesk.

doohicky

0/0
 Reply   Quote More 

 From:  andy  
 To:  Matt     
30463.5 In reply to 30463.4 
Yes :C
0/0
 Reply   Quote More 

 From:  andy  
 To:  Matt     
30463.6 In reply to 30463.4 
Also, while you're here, you've had some experience with servers rejecting mails sent via PHP, right? Am sending the mails through phpMailer (via the server's SMTP) and everyone's receiving them apart from one guy.. where do I start looking??
0/0
 Reply   Quote More 

 From:  Matt  
 To:  andy     
30463.7 In reply to 30463.6 
Restart Cron maybe? Otherwise I haven't a clue. It all worked wonderfully fine when I set up cron jobs on this server using Plesk.

The mail thing.

Set up the Reverse DNS so that the IP resolves to the name of server you use to send the mail. If you do a RDNS lookup on 83.149.123.55 it's actually mail.tehforum.co.uk.

Make sure the DNS records are set up correctly. For Teh Forum we have the following (specific to sending and receiving email):

code:
tehforum.co.uk.              MX (0)  mail.tehforum.co.uk.    
83.149.123.55 / 24           PTR     tehforum.co.uk. 
tehforum.co.uk.              TXT     "v=spf1 a mx ptr"

doohicky

0/0
 Reply   Quote More 

 From:  andy  
 To:  Matt     
30463.8 In reply to 30463.7 
Finally got cron working, turns out I just needed to call 'php /dir/file.php' instead of the actual PHP binary bath... asshole tech support took like 20 emails to tell me, preferring instead to say stuff like "those paths are fine, try doing some debugging" :?

I tried explaining the reverse DNS thing with the PTR and TXT records, but they were fairly insistent that it was because the MX record hadn't been set up yet. Sound right? Should I keep pushing to get the other two set up? (what does the TXT one actually do btw?)
0/0
 Reply   Quote More 

 From:  Matt  
 To:  andy     
30463.9 In reply to 30463.8 
It's from the OpenSPF Sender ID Framework. http://new.openspf.org/SPF_Record_Syntax explains what it does and why you need it. It basically describes your server to others and what it is responsible for etc. Microsoft use it for their anti-phising technology in IE7 I do believe.

The RDNS will help with troublesome ISPs (AOL for one) who reject any email that doesn't come from what they consider a valid mail server, which I gather is mostly one with an IP address that doesn't resolve back to the hostname where the email originated from.

As for the MX record possibly being wrong, I have the following set up for here and it works fine:
code:
tehforum.co.uk.         NS      ns1.tehforum.co.uk.     
tehforum.co.uk.         NS      ns2.tehforum.co.uk.     
ns1.tehforum.co.uk.     A       83.149.123.55   
ns2.tehforum.co.uk.     A       83.149.123.57   
tehforum.co.uk.         A       83.149.123.55   
ftp.tehforum.co.uk.     A       83.149.123.55   
mail.tehforum.co.uk.    A       83.149.123.55   
www.tehforum.co.uk.     CNAME   tehforum.co.uk. 
tehforum.co.uk.         MX (0)  mail.tehforum.co.uk.    
83.149.123.55 / 24      PTR     tehforum.co.uk. 
tehforum.co.uk.         TXT     "v=spf1 a mx ptr"


Technically at least one of the name servers should be hosted elsewhere so that if one of them goes down the site is still accessible but that is too much like hard work for me.

If you only have 1 IP address (we have 3) you can stick both your name servers on the same IP or manage with just the one, but whatever you call them make sure that where ever the domain is hosted it uses the same nameserver hostnames otherwise things won't work.

doohicky

0/0
 Reply   Quote More 

 From:  andy  
 To:  Matt     
30463.10 In reply to 30463.9 
Cheers for that, though I sent off the information to the clients who are faffing around with the DNS entries and they basically told me "someone else is sorting them so don't worry about it". And looking at dnsstuff.com for the domain there's still no PTR or TXT records set up.. I dunno why I bother sometimes.
0/0
 Reply   Quote More 

Reply to All    
 

1–10

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats