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) »
  • Call to undefined method CRM_Utils_System::authenticatescript
Pages: [1]

Author Topic: Call to undefined method CRM_Utils_System::authenticatescript  (Read 5196 times)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Call to undefined method CRM_Utils_System::authenticatescript
August 19, 2007, 07:20:32 pm
I'm using CiviCRM v1.8 stable;  there's a new call to authenticatescript() in bin/civimail.cronjob.php that seems to be causing me a problem.  The context is:

Code: [Select]
    // this does not return on failure
    // require_once 'CRM/Utils/System.php';
    CRM_Utils_System::authenticateScript( true );

Indeed, authenticateScript() is defined in CRM/Utils/System.php but even when the 'require_once' is un-commented, civimail.cronjob.php still fails.

I'm running Apache with FCGI - perhaps the FastCGI is causing me problems?  (I'm not completely sure of all the implications of FCGI.)  Any ideas/suggestions would be appreciated.

Thank you,
=Fen

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: Call to undefined method CRM_Utils_System::authenticatescript
August 19, 2007, 07:41:43 pm

Can u be more specific in how it fails?

Note that we've changed ALL cron jobs in 1.8 as follows:

1. Should be invoked via a url (i.e. via wget or curl)

wget http://<drupal_root>/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?name=<username>&pass=<pw>

The previous version was quite open and allowed anyone to trigger the cron jobs

2. You need to send the name/pass of a valid drupal user in the above script. I think we need to make this even more secure and ensure that this user has "civicrm cron privileges". I suspect we'll make this happen when we move all of permissioning into CiviCRM

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

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Call to undefined method CRM_Utils_System::authenticatescript
August 19, 2007, 11:25:40 pm
Quote from: Donald Lobo on August 19, 2007, 07:41:43 pm
Can u be more specific in how it fails?

Apologies.  Here's the error-log:
Code: [Select]
[warn] mod_fcgid: stderr: PHP Fatal error:  Call to undefined method CRM_Utils_System::authenticatescript() in /home/clients/websites/w_nodrm/civicrm/v1.8-rev10954/bin/civimail.cronjob.php on line 52
Quote
Note that we've changed ALL cron jobs in 1.8 as follows:

1. Should be invoked via a url (i.e. via wget or curl)

wget http://<drupal_root>/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?name=<username>&pass=<pw>

The previous version was quite open and allowed anyone to trigger the cron jobs

2. You need to send the name/pass of a valid drupal user in the above script. I think we need to make this even more secure and ensure that this user has "civicrm cron privileges". I suspect we'll make this happen when we move all of permissioning into CiviCRM

lobo

I generally call it as a URL anyway, and have tried sending in a name/password (though I don't like putting passwords in a URL query string) but get the same issue.  I'll test more tomorrow and report back.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Call to undefined method CRM_Utils_System::authenticatescript

This forum was archived on 2017-11-26.