the famous Failed opening required 'CRM/Utils/Menu.php'

naim - November 25, 2006 - 11:35

hello,
I am using drupal 4.7.3, php 5.1.6-pl6, mysql Ver 14.12 Distrib 5.0.26, and apache apache-2.0.58-r2

I am stuck on this error, seems alot of other people had same problem. I know i have my configs set correct, im using same database for both drupal and civicrm, this makes it easier for figuring out relations. So here is the relative config from civicrm.settings.php
It must be something silly i have overlooked, any help appreciated.

<?php
define
( 'ENABLE_COMPONENTS', 'CiviContribute,CiviMember' );
define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '4.7' );
define( 'CIVICRM_UF_URLVAR'        , 'q'  );
define( 'CIVICRM_UF_DSN'           , 'mysql://drupal:**********@localhost/drupal?new_link=true' );
define( 'CIVICRM_UF_USERSTABLENAME', 'users' );
global
$civicrm_root;
$civicrm_root = '/var/www/localhost/htdocs/drupal/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/localhost/htdocs/drupal/files/civicrm/templates_c/' );
define( 'CIVICRM_UPLOADDIR'          , '/var/www/localhost/htdocs/drupal/files/civicrm/upload/'  );
define( 'CIVICRM_IMAGE_UPLOADDIR'    , '/var/www/localhost/htdocs/drupal/files/civicrm/persist/');
define( 'CIVICRM_CUSTOM_FILE_UPLOADDIR'    , '/var/www/localhost/htdocs/drupal/files/civicrm/crm_docs/' );
define( 'CIVICRM_UF_BASEURL'      , 'http://localhost/drupal/' );
define( 'CIVICRM_UF_RESOURCEURL'  , 'http://localhost/drupal/modules/civicrm/' );
define( 'CIVICRM_IMAGE_UPLOADURL' , 'http://localhost/drupal/files/civicrm/persist/' );
define( 'CIVICRM_MYSQL_VERSION', 5.0 );
define( 'CIVICRM_DSN'          , 'mysql://drupal:***********@localhost/drupal?new_link=true' );
define( 'CIVICRM_MYSQL_PATH', '/usr/bin/' );
?>

where is 'CRM/Utils/Menu.php'

naim - November 25, 2006 - 11:44

i see that file does not exist, but i used the official tar downloaded from www.civicrm.org , anyone has same issue ? changing 'CRM/Utils/Menu.php' to 'CRM/Core/Config.php' means having to change all subsequent path for every 'require_once' , i tried that (stupid thing to do) , but seems problems were only getting worse, obviously thats not the way.
Thanks

CIVICRM_CUSTOM_FILE_UPLOADDIR

glendac - November 25, 2006 - 17:38

I don't know if CIVICRM_CUSTOM_FILE_UPLOADDIR is related to the error message you are getting but you should define it as:

define( 'CIVICRM_CUSTOM_FILE_UPLOADDIR'    , '/var/crm_docs/' );

As to the Menu.php file, it should be in CRM/Core/. Hope this helps.

like i already said ..

naim - November 25, 2006 - 23:02

..changing 'CRM/Utils/Menu.php' to 'CRM/Core/Config.php' means having to change all subsequent paths for every 'require_once' in every other somehow related php file in the drupal directory.
so first i get ::

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/I18n.php' (include_path='.:/usr/share/php5:/usr/share/php') in /var/www/localhost/htdocs/drupal/modules/civicrm/CRM/Core/Menu.php on line 38

I even tried changing all subsequent paths tp absolute format (stupid thing to do) , but seems problems were only getting worse, obviously thats not the way.

Any help appreciated

In your civicrm_settings.php

glendac - November 25, 2006 - 23:44

In your civicrm_settings.php file, did you already change

define( 'CIVICRM_CUSTOM_FILE_UPLOADDIR'    , '/var/www/localhost/htdocs/drupal/files/civicrm/crm_docs/' );

to

define( 'CIVICRM_CUSTOM_FILE_UPLOADDIR' , '/var/crm_docs/' );

Did that help at all?

solved .. at least got rid of the famous error

naim - November 25, 2006 - 23:47

well seems i was using the wrong file, there is a module called civicrm at the drupal modules section, as with any module, you put the extracted file in the modules directory, and you are set. Thats what i thought, i was so wrong!!
with CiviCRM you must download a separate tar from www.civicrm.org .. but NOT USE THE MODULE FROM DRUPAL !!!! this wasted so much of my time, and i wonder what that file is doing there ?? the correct file to use would be in the tarball downloaded from http://www.civicrm.org under civicrm/drupal/
Come to think about it, installation was really simple, if only this node did not exist !!
http://drupal.org/node/83200

The civicrm files must have

glendac - November 26, 2006 - 00:43

The civicrm files must have some quirks because I have two successful installations using the file (civicrm-drupal-php4-1.5-rev7470.tgz) from following the download link from this very node (posted by lobo). The file from www.civicrm.org has the same name.

What users shouldn't use is the file (CiviCRM-4.7.x-dev.tar.gz) from http://drupal.org/project/CiviCRM (linked from the Drupal modules section and posted by geilufe with an accompanying but confusing instruction to download all files from www.civicrm.org).

Also, I have installed civicrm to the Drupal modules directory just like any other contrib module I've installed (as subdirectories) with the exception of course with configuring that maddening civicrm_settings.php file and then moving it to the sites/default/ directory of Drupal. Anyhow, civicrm is certainly one of the more challenging Drupal contrib modules to install. I'll try to install civicrm 1.6 alpha on Drupal 5 beta this week to see if it will be any easier.

i still dont understand why

naim - November 27, 2006 - 01:30

i still dont understand why there is a link to download civicrm.module on drupal.org/project/CiviCRM

Its not written in the main docs that i should use the civicrm.module from www.civicrm.org, or maybe i did not see it, but anyway, that file is useless on www.drupal.org
makes no sense whatsoever .. the file is a obsolete

Multi-site

mikerouse - February 15, 2009 - 00:35

I installed Drupal and set up two sites to run off the same installation (only the first time I have done this btw).

I then went and installed CiviCRM and installed it to its own database with the intention of being to run the two sites off the same CiviCRM installation. I followed the steps over at CiviCRM and enabled the module, but I did this from the second site not the first (main) one. I got this error:

PHP Fatal error: require_once() [function.require]: Failed opening required 'CRM/Utils/System.php' (include_path='.:') in /var/www/vhosts/mydomain.tld/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module on line 239

I went back to the primary site and went in to modules (not getting this error on the primary site) and enabled the module in the primary site and it seems to be working just fine. However, when I go back to the secondary site it gives me a blank page for every page and the above line appears in my error.log file.

Update: This is with CiviCRM 2.2 beta and Drupal 6.9. Running on PHP5.x and MySQL5.x on Apache on CentOS.

 
 

Drupal is a registered trademark of Dries Buytaert.