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 »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error with settings php file but its there
Pages: [1] 2

Author Topic: Error with settings php file but its there  (Read 6702 times)

pbaker

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal
  • MySQL version: 5.0.51
  • PHP version: 4
Error with settings php file but its there
October 27, 2011, 05:33:14 am
i have done the install of drupal and civicrm. Everything went ok apart from the last bit and now im getting two errors up. One is saying the civicrm.settings.php isnt in sites/defaults folder but it is as i checked this.

    Warning: include_once(sites/default/civicrm.settings.php) [function.include-once]: failed to open stream: No such file or directory in civicrm_initialize() (line 284 of /var/www/drupal/sites/all/modules/civicrm/drupal/civicrm.module).

 Warning: include_once() [function.include]: Failed opening 'sites/default/civicrm.settings.php' for inclusion (include_path='/usr/share/php:/usr/share/pear:/usr/share/php/libzend-framework-php') in civicrm_initialize() (line 284 of /var/www/drupal/sites/all/modules/civicrm/drupal/civicrm.module).

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with settings php file but its there
October 27, 2011, 05:35:48 am
What are the permissions on sites/default/civicrm.settings.php ? Perhaps Apache can't read/execute it.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

pbaker

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal
  • MySQL version: 5.0.51
  • PHP version: 4
Re: Error with settings php file but its there
October 27, 2011, 08:52:19 am
i have set the permissions onto 0755 so read and write access is enabled to that file for user and not group.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with settings php file but its there
October 27, 2011, 10:04:21 am
Not sure. Can you ask your host?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

jenniwoo

  • I’m new here
  • *
  • Posts: 4
  • Karma: -1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Error with settings php file but its there
February 06, 2012, 10:36:19 pm
My sites/default/civicrm.settings.php permissions are 775.  I got the same error after installing D7, installing CiviCRM, and logging in as Admin.  That was in Fall 2011.  I notice no one has answered the question in any way. 

I do not want to single-step with a debugger through the 2 civicrm PHP files that setup the path to civicrm.settings.php and are triggering the "warning statements" on some Admin pages.  And I'm not sure what kind of php print statement to insert before the function call that triggers the warning, nor do I know where the print output should go. 

Help my please OB1 Kanobe. 

JGW, sf (Lea's mom...)
« Last Edit: February 06, 2012, 10:41:00 pm by jenniwoo »

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Error with settings php file but its there
February 07, 2012, 01:04:14 am
Am getting this problem too with Drupal 6 and 4.1b3.

Have had much brighter people than me looking at it and not found the answer yet.

Help!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with settings php file but its there
February 07, 2012, 03:08:26 am
jenniwoo and galdi56, I would definitely suggest you ask your host, as the original error posted has to do with file permissions (and ownership) and so any normal host should be able to assist with that.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Error with settings php file but its there
February 07, 2012, 05:22:11 am
Sorry Hershal this is not a permissioning error - although it warns like one...

From my host/developer:

After looking into the supplied PHP, it appears that there is an application error occurring inside the initialise function of the plug-in, however this is a very large amount of code and debugging it may take some time. We are suspicious is that there is a relative path issue in the installation, however we currently cannot be sure...

Not really sure where to go from here..

system appears to be working fine apart from the warning message!!

P

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with settings php file but its there
February 07, 2012, 05:24:46 am
What is your precise error message? And can you post your civicrm.settings.php file? Change the passwords if you like.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Error with settings php file but its there
February 07, 2012, 05:46:56 am
Hiya - civicrmsettings file attached (I *hope* that i have edited out all the passwords!)

An example of the errors generated into the drupal error log is:

"include_once(): Failed opening '/civicrm.settings.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/dqmgroup.com/sites/all/modules/civicrm/drupal/civicrm.module on line 238."

Worth emphasising here that install went fine and by the book - these errors just come up every few pages as the site is used.

Cheers

jenniwoo

  • I’m new here
  • *
  • Posts: 4
  • Karma: -1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Error with settings php file but its there
February 08, 2012, 04:34:57 pm
I get the same error message as does 'galdi56.'   BTW why do you, Hershel, need the civicrm.settings.php file when the problem is, as you said, the "initializing PHP" code... as both galdi56 and I deduced.  Surely you have the test bench to trap the error and trace the "path" that is created that is wrong. 

Have you reproduced the warning/error yet for either or both D6 or D7 as we've described? 

I am still reluctant to setup my own local test bench, even though I have NetBeans and Eclipse.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with settings php file but its there
February 09, 2012, 09:21:40 am
Hi. I never wrote the "initializing PHP" code, that was someone else actually.

galdi56, if your error only comes up "every few pages as the site is used" then I would look to see if there is a pattern as to when it comes up, to determine what causes it.

jenniwoo, did you ask your host for assistance?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Error with settings php file but its there
February 10, 2012, 09:05:28 am
Hi Hershal

appreciate your response... the error doesnt appear to have much discernable pattern to it (unfortunately). It's worth noting that the error can be reported when im doing admin activity in drupal that is completely unrelated to civicrm (although as we are using poormanscron this could actually be generated by hitting a condition that causes cron to execute it's scheduled tasks - perhaps including a civicrm one?

It feels like once the error condition has occured during a session that it then appears more and more frequently... subjective i know... :)

I'll keep trying to spot something - Civicrm does appear to be functioning fine (Although with the inability to synch contacts as previously reported).

Many thanks, Peter

galdi56

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 6
  • MySQL version: 5.1.49
  • PHP version: PHP Version 5.3.3-7+squeeze3
Re: Error with settings php file but its there
February 17, 2012, 09:58:05 am
Just to let you know that I am still getting the above message - although the site and civicrm seems to be functioning fine! - it appears when logged into drupal as an admin and it appears during any activity - i.e. just adding drupal content without actually going near any obvious civicrm functionality... it's irritating as hell but thats all!

jenniwoo

  • I’m new here
  • *
  • Posts: 4
  • Karma: -1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Error with settings php file but its there
March 22, 2012, 05:50:54 pm
No one has had a clue for the last 30 days, says the "Post Reply" editor. 

FWIW I strongly agree with the notion posted 30+ days earlier that the error is a "relative path issue." I would like to trace how the "sites/default/civicrm.settings.php" string is setup and how it's used in the code.  Except I just don't know where on my web host's file system to send the output of a "trace-print" statement or 2 or 3 that I might insert before the code statement which triggers the warning messages.  I'll think more about that.

Meanwhile FYI I recently setup a Wordpress3 + C4.1.1 test site and a Joomla v2.5.3 + C4.1.1 test site.  Bother C4 installations went fine and I get to the civi admin dashboard in both systems without any problem.  Ergo, the corresponding civicrm.settings.php file (1) exists and (2) gets properly found, imported, and used to create that page.

On Drupal 7, however, I get no joy with D7 + either C4.0.8's or C4.1.1's civicrm.settings.php file, as others have confirmed to be a problem! 

Besides the "irritation factor," mentioned earlier, how can CiviCRM support & developer people let this problem for D7+C4 continue unaddressed and unsolved for so many months?  Surely other D7 users are whining loudly about the problem to you.  Does management put "less smart" people in "first tier support" positions... with no 2nd tier to back them up?

PS: It's not up to my host provider to debug this for me.  If I / the site doesn't get a PHP error, e.g. an error message that some PHP module is missing or triggered an error, why should they?  Surely I'd see that error on the error answer page! I've got error reporting "turned on" for PHP.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error with settings php file but its there

This forum was archived on 2017-11-26.