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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Fatal error: require_once() [function.require]:
Pages: [1]

Author Topic: Fatal error: require_once() [function.require]:  (Read 1596 times)

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Fatal error: require_once() [function.require]:
June 09, 2009, 10:58:56 am
Hello,

I accidentally changed something in my civicrm.settings.php and saved it to the server, then i got all kind of warnings, after changing the file to the original state again i get this message

Somebody knows the reason of this?

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mhostorg/public_html/chautaara.be/sites/all/modules/civicrm/drupal/modules/views/civicrm.views.inc on line 47

Majo

see site : http://www.m-host.org/chautaara.be/
« Last Edit: June 09, 2009, 11:01:24 am by majovdh »

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 11:20:08 am
check permissions on civicrm.settings.php and make sure it is readable by webserver. permissions should be 755 on that file...report back.

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 11:26:06 am
I checked the permissions before and nothing changed.

I actually think i deleted some of the civicrm.settings.php becaus if i ru the updatescript i get this message

Oops! - The path for including CiviCRM code files is not set properly. Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (sites/default/civicrm.settings.php).

ยป civicrm_root is currently set to: .

Is there somewhere i can find a clean civicrm.settings.php file

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 11:36:00 am
the file I accidentally changed an need to upgrade is placed in sites/default/civicrm.settings.php

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 11:37:27 am
if that is the only thing you changed, just set it like so:

$civicrm_root = '<path_to_drupal_root>/sites/all/modules/civicrm/';

obviously putting in your path correctly.

if you look above that area in the same file there is commented out code with examples for all of the paths so you can also copy those....for every area there is commented out examples.



majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 11:55:37 am
putting this in the civicrm.stteings.php file under sites/default??


majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 12:03:45 pm
This is my whole civicrm.settings.php under sites/default i think i removed soo much accidently where can i find a clean settings file so i can adjust everything?

If i have to reinstal civicrm i will lose all my data in the database

Majo


<?php
/**
 * CiviCRM Configuration File - v2.2
 */

/**
 * Content Management System (CMS) Host:
 *
 * CiviCRM can be hosted in either Drupal or Joomla.
 *
 * Settings for Drupal 6.x:
 *      define( 'CIVICRM_UF'        , 'Drupal' );
 *
 * Settings for 1.5.x:
 *      define( 'CIVICRM_UF'        , 'Joomla' );
 *
 * Settings for Standalone:
 *      define( 'CIVICRM_UF'   , 'Standalone');
 *
 * You may have issues with images in CiviCRM. If this is the case, be sure
 * to update the CiviCRM Resource URL field (in Administer CRM: Global
 * Settings: Resource URLS) to your CiviCRM root directory.
 */
define( 'CIVICRM_UF'               , 'Drupal'        );

/**
 * Content Management System (CMS) Datasource:
 *
 * Update this setting with your CMS (Drupal or Joomla) database username, server and DB name. Comment it out if using CiviCRM standalone.
 * Datasource (DSN) format:
 *      define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
 */
define( 'CIVICRM_UF_DSN'           , 'mysql://*****************:********@localhost/*********?new_link=true' );

/**
 * CiviCRM Database Settings
 *
 * Database URL (CIVICRM_DSN) for CiviCRM Data:
 * Database URL format:
 *      define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
 *
 * Drupal and CiviCRM can share the same database, or can be installed into separate databases.
 *
 * EXAMPLE: Drupal and CiviCRM running in the same database...
 *      DB Name = drupal, DB User = drupal
 *      define( 'CIVICRM_DSN'         , 'mysql://drupal:YOUR_PASSWORD@localhost/drupal?new_link=true' );
 *
 * EXAMPLE: Drupal and CiviCRM running in separate databases...
 *      Drupal  DB Name = drupal, DB User = drupal
 *      CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
 *      define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true' );
 *
 */
 
define( 'CIVICRM_DSN'          , 'mysql://*******:*******@localhost/*******?new_link=true' );

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Fatal error: require_once() [function.require]:
June 09, 2009, 12:46:12 pm
Problem solved

found a backup somewhere in Cpanel and could restore civicrm.settings.php file

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Fatal error: require_once() [function.require]:

This forum was archived on 2017-11-26.