CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • getting a cron job set up for civimail
Pages: [1]

Author Topic: getting a cron job set up for civimail  (Read 5420 times)

ginga

  • Guest
getting a cron job set up for civimail
December 16, 2008, 08:06:57 am
I have tried setting a cron job up following the Civicrm documentation but having no luck. When I try to enter in the URL directly into the browser I get a page not found on my site. I feel it has something to do with it is not matching the username and password that I am passing with the URL.

This is the URL format
http://www.website.org/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=drupal_login_name&pass=drupal_login_pass

The other thing I haven't did was set up both AMaViS and Postfix. I am assuming and hoping that this is preconfigured on my site. If it is not, would this be a cause for concern

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: getting a cron job set up for civimail
December 16, 2008, 08:20:14 am
Quote
When I try to enter in the URL directly into the browser I get a page not found on my site.

This means you are entering wrong url. What's the path of CiviCRM install in drupal


Quote
The other thing I haven't did was set up both AMaViS and Postfix. I am assuming and hoping that this is preconfigured on my site. If it is not, would this be a cause for concern

No it's not the cause for this problem.

Kurund
Found this reply helpful? Support CiviCRM

ginga

  • Guest
Re: getting a cron job set up for civimail
December 16, 2008, 10:00:26 am
The path is public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php

This seems to be standard path I think. I checked mine and it is the same.

I hope you can help, I've spent lots of time trying to figure this out

ginga

  • Guest
Re: getting a cron job set up for civimail
December 16, 2008, 10:10:39 am
Just another note, I am using the main super user of my Drupal install in the URL

And I tested just to see if I could see other files in the same folder so I created to new files

test.html which I can see and test.php which gives me the same error as trying to run the cron file
« Last Edit: December 16, 2008, 10:20:44 am by ginga »

ctarascio

  • I post frequently
  • ***
  • Posts: 334
  • Karma: 30
    • American Friends Service Committee
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.20
  • PHP version: 5.3.13
Re: getting a cron job set up for civimail
December 16, 2008, 10:35:05 am
Hello ginga,
   I think you might need to supply a site key: http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration.
   Please let us know if this helps.

Cynthia

ginga

  • Guest
Re: getting a cron job set up for civimail
December 16, 2008, 12:07:23 pm
Thanks Cynthia, I tried that but still no luck, I have discovered that I can not access any php files in the same folder but can create a html file and get to it. What I did to do for testing was move the civimail.cronjob.php to the root directory of the site and I can run it there no problem. seems to be an issue with php files in that folder

Does not work here
public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php

Works here
public_html/civimail.cronjob.php

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: getting a cron job set up for civimail
December 17, 2008, 05:12:01 am
Quote from: ginga on December 16, 2008, 12:07:23 pm
I have discovered that I can not access any php files in the same folder but can create a html file and get to it. What I did to do for testing was move the civimail.cronjob.php to the root directory of the site and I can run it there no problem.

This means that something blocks PHP access to the files in the CiviCRM (sub)folder. Please contact your administrator/webhosting.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piyush

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
    • Pecan Solutions
Re: getting a cron job set up for civimail
June 18, 2009, 05:40:53 am
I have the same problem where php scripts in the /sites/all/modules/civicrm/bin folder (of a Drupal based CiviCRM install) are not accessible, by wget or by direct web browser url, and returning a 404 Not Found Error.

Non php files are fine.

I have looked at the .htaccess and nothing seems to be out of the ordinary. On another site with a very similar install everything works fine, but I just can't figure out why this isn't working on this one!

Did anyone else come across this issue, and how did you solve it?
Seems to be an issue with the php files being in that subdirectory. If I move the civimail.cronjob.php script to the top level at /public_html, it works ok.

Thanks.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: getting a cron job set up for civimail
June 18, 2009, 08:38:53 am
It must be your server configuration. Check the server’s logs to see what they say when you try to access the PHP files in that directory.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piyush

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
    • Pecan Solutions
Re: getting a cron job set up for civimail
June 18, 2009, 03:55:18 pm
Just to let you know, it was the directory permission setting on that directory!

My server hosting php settings do not allow calling a php script if the directory is unsafe, i.e. set to 777. Needed to be 755 or better still 644.

Hope this helps anyone else encountering this issue.

karunadave

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
    • Karuna Dev
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6.30 or Drupal 7.26 Drush 6.2.0
  • MySQL version: 5.5.35-cll - MySQL Community Server (GPL)
  • PHP version: 5.3.21
Re: getting a cron job set up for civimail
April 29, 2011, 11:43:31 pm
I have a similar problem running civimail.cronjob.php with the three arguments, in the default
Code: [Select]
../sites/all/modules/civicrm/bin path gives a 404. If I run EmailProcessor.php in the same bin folder with the same three arguments it works just fine. 

I am puzzled.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: getting a cron job set up for civimail
May 10, 2011, 06:14:30 am
Quote from: karunadave on April 29, 2011, 11:43:31 pm
I have a similar problem running civimail.cronjob.php with the three arguments, in the default
Code: [Select]
../sites/all/modules/civicrm/bin path gives a 404. If I run EmailProcessor.php in the same bin folder with the same three arguments it works just fine. 

Check the file permissions of these two files (are they readable by the webserver, etc.). Also check whether the .htaccess file (if there is one, or one somewhere up the directory tree) does not block one while allowing the other.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • getting a cron job set up for civimail

This forum was archived on 2017-11-26.