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) »
  • Error when cron.php runs
Pages: [1]

Author Topic: Error when cron.php runs  (Read 3712 times)

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Error when cron.php runs
November 06, 2012, 04:24:16 am
HI,

running civicrm 4.1.5 on wordpress 3.4.2

trying to get the cron / scheduled mailings configured and thanks to my hosting company have got the job running - but getting an error:

Warning: require_once(../civicrm.config.php): failed to open stream: No such file or directory in /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin/cron.php on line 29

Fatal error: require_once(): Failed opening required '../civicrm.config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin/cron.php on line 29

Now if I'm reading this right it wants civicrm.config.php to be in civicrm/civicrm/ and the file DOES appear to be in that directory with 0644 permissions.

Any advice?

Many thanks,
Clare.


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: Error when cron.php runs
November 06, 2012, 06:22:50 am

in your cron command, make sure you cd to the bin directory before running cron.php. so, something like:

cd  /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin; php cron.php ARGS HERE

i'm not very sure why we distribute that file any more. Seems like we've been moving to using cli.php for all cli interaction

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

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 12, 2012, 08:20:21 am
Thanks so much for coming back to me.

I ran:

cd /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin; /usr/local/bin/php cron.php + PARAMS

But now get the error:

ERROR: You need to send a valid user name and password to execute this file

Could you tell me the correct syntax to pass a username/password?

I really appreciate your help as I'm under a little pressure to get out our xmas newsletter and don't want to have to revert to our old method.

Thanks!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 12, 2012, 08:43:47 am
The syntax is in the bottom half of this page:

http://wiki.civicrm.org/confluence/display/CRMDOC41/Managing+Scheduled+Jobs

If that doesn't help, then post your full cron job, just change the username and password.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 13, 2012, 07:48:38 am
Hi

Still no luck, I assume its the DB user name/password (used in wp-content/plugins/civicrm/civicrm.settings.php) that I should be using - I've tried every variation (-u -user etc) and also changed the password as it had punctuation - just in case. So this is what I have (its running from within the control panel)

cd  /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin; /usr/local/bin/php cron.php -user DB_UNAME -password DB_PWORD

I've attached a screenshot of the actual setup.

Thanks....

 ???

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 13, 2012, 07:51:11 am
Quote from: theclaredotcom on November 13, 2012, 07:48:38 am
I assume its the DB user name/password (used in wp-content/plugins/civicrm/civicrm.settings.php) that I should be using

No, it's the name/pass you use to login into your WordPress administration area.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 13, 2012, 09:25:06 am
Hi,

Thanks... I tried the WP admin password:

cd  /home/m557400/public_html/wp-content/plugins/civicrm/civicrm/bin; /usr/local/bin/php cron.php -u admin -p adminpword

still getting the same error

 :-[

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 13, 2012, 09:39:28 am
Try without spaces -uadmin -padminpword and if that fails, try the URL method, just to see that it works.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 14, 2012, 07:09:59 am
firstly Hershel, thank you so much for your patience.

removing the spaces didn't work and I tried the url method, but first it gave an error about contact-7 (plugin) so  deactivated it (because if I can ever get civicrm working we won't need it) - this time no error - just a blank screen - the newsletter still says scheduled and it hasn't sent anything.

ran

http://www.mga-charity.ie/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Clare&pass=PASSWORD&key=KEY

which was the instruction on the wiki

now having to send out the emails via the old system....  :'( which is annoying and frustrating because civicrm looks like it could be so useful to our organisation...

thanks...




Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 14, 2012, 07:35:26 am
Well, blank screen is actually correct. :)

Is the outgoing mail job enabled at  civicrm/admin/job?reset=1 ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 14, 2012, 08:13:27 am
ok... I thought blank was bad  :-\

Quote
Is the outgoing mail job enabled at  civicrm/admin/job?reset=1 ?

Its been a long long day... iI'm not sure what you mean (I'm sorry - I'm actually a programmer by background but find a lot of the manual is written assuming you already know how civicrm works and fits together...)

thank you again...

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 14, 2012, 08:17:10 am
Quote from: theclaredotcom on November 14, 2012, 08:13:27 am
ok... I thought blank was bad  :-\

No, white is beautiful sometimes. ;)

URL is http://wordpress.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/job&reset=1 for schedule jobs. Insert your domain name as appropriate. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

theclaredotcom

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: wordpress 3.4
  • MySQL version: 5.5.16
  • PHP version: 5.3.8
Re: Error when cron.php runs
November 14, 2012, 09:36:29 am
 ;D

You are my knight in shining armour!
that cracked it!
Now al I have to do is get the unsubscribe / opt out working properly  :-\

but I'm getting there!

Thank you so much and thanks for your patience.

Clare.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error when cron.php runs
November 14, 2012, 09:44:42 am
Quote from: theclaredotcom on November 14, 2012, 09:36:29 am
You are my knight in shining armour!

Happy to help.

Code: [Select]
   |\             //
    \\           _!_
     \\         /___\
      \\        [+++]
       \\    _ _\^^^/_ _
        \\/ (    '-'  ( )
        /( \/ | {&}   /\ \
          \  / \     / _> )
           "`   >:::;-'`""'-.
               /:::/         \
              /  /||   {&}   |
             (  / (\         /
             / /   \'-.___.-'
            / /     \ \
          /___|    /___|
 
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Error when cron.php runs

This forum was archived on 2017-11-26.