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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How to run PHP scripts from bin directory
Pages: [1]

Author Topic: How to run PHP scripts from bin directory  (Read 1778 times)

hirbys

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
    • ESTHER
How to run PHP scripts from bin directory
April 19, 2009, 12:03:26 pm
Can someone please point me to documentation on how to use php scripts from the bin directory? I have downloaded a script to automagically generate households, placed it in the bin directory, and configured in it the paths to my civicrm.settings.php and Drupal settings.php. When I try to execute the script from the browser, I receive multiple error messages about require() failures. Must be something else I need to know.

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: How to run PHP scripts from bin directory
April 19, 2009, 08:08:45 pm

1. what script are you using? seems like an error in the script

2. can u be give us the exact error message

thanx

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

hirbys

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
    • ESTHER
Re: How to run PHP scripts from bin directory
April 20, 2009, 12:38:04 pm
Script was posted in Developer Discussion in April of 2008. Link is here:

http://forum.civicrm.org/index.php/topic,2735.msg12922.html#msg12922

I'm currently receiving he following error when I run the script from the browser (I've substituted [drupal_base] for the first part of the path):

Quote
Warning: require_once(./includes/cache.inc) [function.require-once]: failed to open stream: No such file or directory in [drupal_base]/includes/bootstrap.inc on line 1001

Fatal error: require_once() [function.require]: Failed opening required './includes/cache.inc' (include_path='[drupal_base]/:.:[drupal_base]/sites/all/modules/civicrm:[drupal_base]/sites/all/modules/civicrm/packages:.:/usr/local/php5/lib/php:/usr/local/lib/php') in /[drupal_base]/includes/bootstrap.inc on line 1001

hirbys

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
    • ESTHER
Re: How to run PHP scripts from bin directory
April 26, 2009, 06:41:13 pm
Quote from: hirbys on April 20, 2009, 12:38:04 pm
Script was posted in Developer Discussion in April of 2008. Link is here:

http://forum.civicrm.org/index.php/topic,2735.msg12922.html#msg12922

I'm currently receiving he following error when I run the script from the browser (I've substituted [drupal_base] for the first part of the path):

Quote
Warning: require_once(./includes/cache.inc) [function.require-once]: failed to open stream: No such file or directory in [drupal_base]/includes/bootstrap.inc on line 1001

Fatal error: require_once() [function.require]: Failed opening required './includes/cache.inc' (include_path='[drupal_base]/:.:[drupal_base]/sites/all/modules/civicrm:[drupal_base]/sites/all/modules/civicrm/packages:.:/usr/local/php5/lib/php:/usr/local/lib/php') in /[drupal_base]/includes/bootstrap.inc on line 1001

I now find I no longer need to run this script, since combining mailings to an address works with or without households so long as the addresses are identical.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How to run PHP scripts from bin directory

This forum was archived on 2017-11-26.