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) »
  • civimail cornjob error
Pages: [1] 2

Author Topic: civimail cornjob error  (Read 4067 times)

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
civimail cornjob error
August 20, 2010, 06:06:15 am
My cronjob doesn't work after upgrading to  3.2.0

When i try to run it via my browser i get this error:

Warning: require_once(bin/cli.php) [function.require-once]: failed to open stream: No such file or directory in /home/komimo/public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php on line 67

Fatal error: require_once() [function.require]: Failed opening required 'bin/cli.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/komimo/public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php on line 67




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: civimail cornjob error
August 20, 2010, 06:41:51 am

can u post your complete url u use to invoke civimail.cronjob.php. you should mask sensitive info (hostname, username, pass, key)

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

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: civimail cornjob error
August 20, 2010, 06:49:36 am
http://www.komimo.be/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=myname&pass=mypass&key=mykey


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: civimail cornjob error
August 20, 2010, 07:01:28 am

can u edit that file (civimail.cronjob.php) and find out what value argv is being set? also what version of php are u running?

based on the manual:

http://php.net/manual/en/reserved.variables.argv.php

that variable should not be set when running from a browser

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

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: civimail cornjob error
August 20, 2010, 07:20:19 am
PHP Version 5.2.11

i can edit the file but i'm afraid the manual is chinese to me. do i have to add some code and tell you what happens?

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: civimail cornjob error
August 20, 2010, 08:21:39 am

yes, u need to print the variable and let us know the contents. If you are not familiar with php, please ask someone locally who can help u out.

we tried the cronjob earlier today on both drupal and joomla and it worked for us

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civimail cornjob error
August 20, 2010, 08:48:58 am
Hi,

Completely unrelated you your problem, but as you seem to be in belgium, may I suggest you to attend the next Benelux civimeetup in brussels?

http://civicrm.org/civicrm/event/info?id=74&reset=1

Hope to see you there.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: civimail cornjob error
August 23, 2010, 01:21:28 am

I tried to do it myself and this was the result

array(1) {
  • =>  string(44) "name=myname&pass=mypass&key=mykey" }


i hope this helps

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: civimail cornjob error
August 23, 2010, 07:09:34 am

sorry, no idea why argv is set in your case (based on the PHP manual it should not be)

your best bet would be to hire someone from http://civicrm.org/professional/ to investigate this issue

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civimail cornjob error
August 23, 2010, 08:35:43 am
I would suspect your server configuration being the problem.

You need to fix it first to be able to run civicrm (or any program most probably)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: civimail cornjob error
August 24, 2010, 12:35:53 am
I wil ask my local guru to take a look.

@ xavier - my drupal/civicrm and other programs all work fine. the only problem i have is the cron.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: civimail cornjob error
August 24, 2010, 02:59:17 am
Personally my money is on the cornjob thing - I'm sure corn isn't good for a server!
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

BigP

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: civimail cornjob error
August 26, 2010, 05:43:01 am
I was chewing a bit on my corn problem.

Maybe this is like "cursing in church' (bad translation of dutch saying) i took the civimail.cronjob.php file from my previous version (3.1.4) and replaced the new file.

Now cron works again. So there is a problem in the code added since.

statrixbob

  • Guest
Re: civimail cornjob error
August 26, 2010, 08:17:36 pm
IGNORE ALL THIS...xavier pointed me in the right direction...turns out I was trying to set off civimail.cronjob.php from the wrong location...inside the /civicrm/bin directory instead of from the module root /civicrm. Go figure! Thanks xavier!

I had pretty much the same error (line 67) which, once fixed let to a similar error further on in the process. Once I fixed that I had yet another problem, but once I dealt with that things seem to work fine.

My first install was 3.2.0 (yes, I'm new to this) and mail via the cronjob (I'm using CLI method) was failing. Here are the errors and my fixes. I've replaced portions of my path with ...

First Error Message:

Warning: require_once(bin/cli.php): failed to open stream: No such file or directory in .../sites/all/modules/civicrm/bin/civimail.cronjob.php on line 67

Fatal error: require_once(): Failed opening required 'bin/cli.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in .../sites/all/modules/civicrm/bin/civimail.cronjob.php on line 67

Fix: sites/all/modules/civicrm/bin/civimail.cronjob.php

Change
Line 67:  require_once ("bin/cli.php");
To
Line 67:  require_once ("./cli.php");

It seems that civimail.cronjob.php and cli.php are in the same folder and the bin/cli.php location was confusing the process.

Once that was fixed I had a new error which looked suspiciously similar...sure enough...

Second Error Message:

Warning: require_once(./civicrm.config.php): failed to open stream: No such file or directory in .../sites/all/modules/civicrm/bin/cli.php on line 96

Fatal error: require_once(): Failed opening required './civicrm.config.php' (include_path='packages/:.:/usr/lib/php:/usr/local/lib/php') in .../sites/all/modules/civicrm/bin/cli.php on line 96

Fix: sites/all/modules/civicrm/bin/cli.php

Change
Line 96:  require_once ("./civicrm.config.php");
To
Line 96:   require_once ("../civicrm.config.php");

This time the problem is that civicrm.config.php is one up from cli.php.

I'm not sure why the paths aren't working...that is, whether it's just on my host (and similar ones) and means there's a bigger problem, but this does work for me.

Of course once that was done I had an unrelated error having to do with the CiviCRM PEAR.php vs the host PEAR.php. It seems they conflict.

Third Error Message (PEAR):

Fatal error: Cannot redeclare _pear_call_destructors() (previously declared in /usr/lib/php/PEAR.php:775) in .../sites/all/modules/civicrm/packages/PEAR.php on line 811

Fix: sites/all/modules/civicrm/packages/PEAR.php

Rename to PEAR.bak so host installed PEAR.php is called. This is probably suboptimal, but it works in my case.



The move from 3.2.0 to 3.2.2 did not fix the problems above, but it did fix the other problem I was having which was that while I could send mail to contacts I was not generating confirmation emails when registering for events. I'm happy to report that this does work on my system now. This change was noted in: http://issues.civicrm.org/jira/browse/CRM-6661?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel

Aloha,

Bob H.
« Last Edit: August 27, 2010, 01:00:02 am by statrixbob »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civimail cornjob error
August 26, 2010, 11:03:47 pm
@statrixbob
Quote
Warning: require_once(bin/cli.php): failed to open stream: No such file or directory in .../sites/all/modules/civicrm/bin/civimail.cronjob.php on line 67

You should run the cli from the root of your civicrm install, if I understand, you where trying to run it from within the bin ?

Could you try restoring the original file and run it from your civicrm folder, see it solves this warning, and hopefully works directly.

Thinking loud: maybe I should test explicitly to see if I have cli.php and add an error message.


Quote
Maybe this is like "cursing in church' (bad translation of dutch saying) i took the civimail.cronjob.php file from my previous version (3.1.4) and replaced the new file.

Now cron works again. So there is a problem in the code added since.

Really the problem is in your configuration. $argv should be set only if it runs from the cli, but in your case, it is set even when you run it from the web. Check with your server gurus, there is a problem in your configuration.
http://php.net/manual/en/reserved.variables.argv.php
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • civimail cornjob error

This forum was archived on 2017-11-26.