By Neel on Wednesday, 10 December 2014
Posted in General Issues
Replies 4
Likes 0
Views 1.2K
Votes 0
This is continuation to my post here: http://stackideas.com/forums/setting-up-a-cron-job-from-ssh

I have been able to set up the cron rule in my ssh crontab and so far so good. However, when the cron is processed, I am getting the 403 forbidden error. I think it might be due to the filter rules I have in my nginx that bans wget to my server for security reasons. My questions are:

1) Is there a way I can set the cron with the direct path to the php script instead of using cron url as a webserver/client request?

2) Would setting a direct path like '/var/www/html/com_easysocial/path-to-script' work or does the cron script requires the webserver environment ( such as $_SERVER or $_REQUEST )?
Edit the file /components/com_easysocial/cron.php and set your domain. Then, use PHP to execute this php file. However, if your nginx is preventing self access, the php scripts would also fail as the cron.php file relies on curl to connect to your site.
·
Wednesday, 10 December 2014 03:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark. I will look into that and will report back.

Arent you asleep yet? Night owl like me I see.
·
Wednesday, 10 December 2014 03:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay, I just removed the wget restriction on my server since that seems to be an easier option that editing the cron.php file. Thanks for your reply Mark.
·
Wednesday, 10 December 2014 05:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Neel,

You're welcome. Glad that your issue has solved.
·
Wednesday, 10 December 2014 10:22
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post