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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Step by step instructions for troubleshooting CRON setup in CiviMail?
Pages: [1]

Author Topic: Step by step instructions for troubleshooting CRON setup in CiviMail?  (Read 8709 times)

jim_ivy

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Step by step instructions for troubleshooting CRON setup in CiviMail?
April 02, 2009, 04:00:01 pm
I have spent a couple of days trying to get CiviMail working.  It will send a test mail fine.  I can trigger it to send if I navigate to "http://<site>/administrator/index.php?option=com_civicrm&task=civicrm/mailing/queue&reset=1" in my browser.

I have defined a key in civicrm.settings.php.  I pass the name, pass, and key parameters in the cron command.  I get the following error message:
=========================
/web/cgi-bin/php5: Symbol `client_errors' has different size in shared object, consider re-linking
Status: 404 Not Found
Content-type: text/html

No input file specified.
=========================

I suspect this means that there may be a problem with the path to the civimail.cronjob.php file.  I used the tool that my host provides to browse to the file, so there is not a problem with mistyping the path.  I have double checked that many times.

I have also tried running civimail.cronjob.php by typing the path with the ?name ?pass and ?key parameters appended to the end of the line.  That gives me an error message that says "ERROR: You need to send a valid key to execute this file. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration ". 

Is there a step by step procedure that I can use to trouble shoot this?

Thanks.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
April 02, 2009, 05:10:35 pm

the /web/cgi-bin/php5: Symbol `client_errors' has different size in shared object, consider re-linking is an issue you should file with your hosting provider

can u give us the complete url u use for the civimail.cronjob.php when u run it via the browser. Substitute site name/name/pass/key with random characters

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jim_ivy

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
April 02, 2009, 07:56:44 pm
When I type this URL into my browser:

http://www.mydomain.com/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=adminname?pass=adminpassword?key=3cx4aNkpQwxmM1hTMV~!B09iO6

I get this message:

ERROR: You need to send a valid key to execute this file. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration

I have tried several different keys and get the same message no matter what I use for the key.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
April 02, 2009, 08:06:43 pm

the url is in the wrong format, try this format (the last two ? are replaced with &)


http://www.mydomain.com/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=adminname&pass=adminpassword&key=3cx4aNkpQwxmM1hTMV~!B09iO6

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jim_ivy

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
SOLVED:Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
April 03, 2009, 07:12:52 pm
Cron is now working and triggering CiviMail.  The problem was that I was using incorrect syntax to pass the username, password, and key to PHP from the Crontab.  I tried using wget and all of the things in the instructions but nothing worked.  Here are the step by step instructions that worked for me.

First, my hosting provider provides a point and click tool for creating the crontab file.  Here is exactly what I did:

1.  Using the Cron tool provided by my host, I browsed to "civimail.cronjob.php".  Here is the path ../administrator/components/com_civicrm/bin/civimail.cronjob.php.

2.  I clicked on the civimail.cronjob.php file and then on "OK".  The tool automatically creates a command line that points to the civimail.cronjob.php file.

3.  In the tool, I scrolled to the end of the command line and added the three parameters that must be passed to CiviMail.  Make sure these parameters DO NOT use the ? as shows in the CiviMail instructions!!!   Add the parameters AFTER THE QUOTATION MARK.  The parameters that must be passed are:  name=xxxxx  pass=xxxxx key=xxxxx

Replace the xxxx with your own actual values.  The name and password are the ones you use to log into your Joomla as administrator.

4.  Set up the timing for your cron job.  I have mine set to run on the hour and on the half-hour.

5.  Save the cron job and close the tool.

6.  Create a test message in CiviMail and choose the send immediately option.  It won't send until the cron job runs.  In my case that is on the hour and the half-hour.


Here is a copy of the crontab file that the tool created:

# canary
MAILTO="null"
# 3 Trigger CiviMail to send emails
0,30 * * * * /web/cgi-bin/php5 "$HOME/html/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php" name=xxxx pass=xxxx key=xxxx

For testing, the MAILTO= was set to my email address so that I would get the error messages.  After I got it working, I set MAILTO=null so I will not be emailed each time the cron job runs.

$HOME is a variable that my hosting provider uses.  You could probably replace it with the actual location of your home directory.  I don't know and since mine is working, I did not want to spend anymore time fiddling with it.

Note that although pass=xxxx and key=xxxx are on a separate line in this post, in reality they are on the same line as the rest of the command.

I hope this post saves some other nooby from spending several days figuring out how to get CiviMail working.

adastra

  • Guest
SOLVED: Step by step instructions for troubleshooting CRON setup in CiviMail?
April 09, 2009, 02:50:06 pm
In case this helps anyone with the same situation:

My server's CPanel only allows me to locate a script and set the time interval of the cron. So I wasn't able to add the ....php?name=xxx&pass=yyy parameters at the end of the link.

Instead, I created a file named civicrmcron.php in the root installation (in http://mysite.com/), and included this code:

<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://mysite.com/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=xxx&pass=yyy&key=zzz");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
curl_close($ch);
?>

Now when I run my civicrmcron.php file/script as a cron job, it'll call that civimail.cronjob.php link with the name,pass,key parameters and run the cron. Then CiviMail emails get sent!

airwaves

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
September 28, 2009, 02:46:05 pm
To bad this doesn't work for me. It seems like I need an other way to start a cron job from cpanel.

There must be more people who have a hostingprovider with Cpanel.
How can I fire the script?


Edwin.

brigittem

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
May 07, 2010, 01:11:09 am
to adastra : but how do you prevent anyone to launch the url mysite.com/civicrmcronjob ?

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
May 20, 2010, 04:59:18 am
Quote from: airwaves on September 28, 2009, 02:46:05 pm
It seems like I need an other way to start a cron job from cpanel.

CiviCRM 3.2 will have the option to run the cronjob from the commandline; see http://svn.civicrm.org/civicrm/branches/v3.2/bin/civimail.cronjob.php and http://svn.civicrm.org/civicrm/branches/v3.2/bin/cli.php
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.

haro

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2 for d6 and 4.4 for d7
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Step by step instructions for troubleshooting CRON setup in CiviMail?
November 03, 2014, 02:18:25 am
I you get the error "ERROR: You need to send a valid key to execute this file" you should check if your password or key contains special characters. Create a new password and/or key without special characters.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Step by step instructions for troubleshooting CRON setup in CiviMail?

This forum was archived on 2017-11-26.