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) »
  • Strange cron error
Pages: [1]

Author Topic: Strange cron error  (Read 1503 times)

SteveM

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 3
    • OpenConcept Consulting, Inc.
Strange cron error
March 04, 2008, 02:47:10 pm
We have CiviMail running happily on a few servers. My latest install, however, is causing problems. The wget cron job, which looks like the usual:

wget 'http://DOMAIN.TLD/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=USERNAME&pass=PASSWORD'

... returns 'Error: Could not create directory: ./sites. <p>'

- the u/p is for an active Drupal user with CiviMail permissions
- this is the only copy of CiviMail running on this server
- CiviCRM runs happily with the resource URL http://DOMAIN.TLD/sites/all/modules/civicrm/ and with the local directories pointing at the sites/SUBSITE/files/civicrm/ tree
- the same error results no matter what user it's run as (apache, root ...)
- the same error results if I run the cron php script directly (commenting out the permissions check)

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: Strange cron error
March 04, 2008, 04:37:27 pm

Did u create a settings_location.php file in

DRUPAL_ROOT/sites/all/modules/civicrm/settings_location.php

the file contains: (for my machine)

<?php

define( 'CIVICRM_CONFDIR', '/Users/lobo/public_html/drupal/sites' );

?>

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

SteveM

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 3
    • OpenConcept Consulting, Inc.
Re: Strange cron error
March 05, 2008, 09:34:26 am
I hadn't, but I just did ... and got the same error.

But it's solved now: we used relative paths for the various CiviCRM directory settings; changing this to absolute paths solved things.

Some investigation reveals that
- the failed directory creation is @ CRM_Utils_File::createDir( $this->templateCompileDir ) in CRM_Core_Config->initialize()
- when called from the cron script, CRM_Utils_File::createDir has the civicrm/bin directory as its cwd, so it seems to have been trying to create a './sites/DOMAIN/' tree there

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

This forum was archived on 2017-11-26.