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) »
  • DB_DataObject Error: DB Error: connect failed
Pages: [1]

Author Topic: DB_DataObject Error: DB Error: connect failed  (Read 8102 times)

flacorps

  • Guest
DB_DataObject Error: DB Error: connect failed
November 03, 2009, 10:04:44 am
I'm going to break the problem I mention here:

http://forum.civicrm.org/index.php?topic=10404.0

out into its own thread.

Having upgraded to 3.0.2,  the error is now:

Quote
DB_DataObject Error: DB Error: connect failed

My db definitions in the civicrm.settings.php file read:
define( 'CIVICRM_DSN'          , 'mysql://flacorps05:<password redacted>@localhost/flacorps_drp05?new_link=true' )

define( 'CIVICRM_UF_DSN'           , 'mysql://flacorps05:<password redacted>@localhost/flacorps_drp05?new_link=true');

So I'm trying to have civicrm share the Drupal database.

It was cut and pasted from the settings. php file for Drupal.

Thanks!

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: DB_DataObject Error: DB Error: connect failed
November 03, 2009, 11:19:32 am

most likely there is a login issue, i.e. the username/password/db name do not match

you might want to go back and double/triple/quadruple check the settings again

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

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 03, 2009, 12:00:09 pm
From settings. php

'mysql://flacorps_drp05:<password redacted>@localhost/flacorps_drp05'

If it's in the login it's got to be a password issue ... but I can't see how because I'm cutting and pasting.

Would a path problem do it? Path has been: /home1/flacorps/public_html/leadprompter/debtrevolt/modules/civicrm/templates

But when I set it to /public_html/leadprompter/debtrevolt/modules/civicrm/templates the Drupal site isn't crashed but I get the following:

Quote

    * warning: include_once(CRM/Core/Config.php) [function.include-once]: failed to open stream: No such file or directory in /home1/flacorps/public_html/leadprompter/debtrevolt/modules/civicrm/drupal/civicrm.module on line 251.
    * warning: include_once() [function.include]: Failed opening 'CRM/Core/Config.php' for inclusion (include_path='.:/public_html/leadprompter/debtrevolt/modules/civicrm:/public_html/leadprompter/debtrevolt/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home1/flacorps/public_html/leadprompter/debtrevolt/modules/civicrm/drupal/civicrm.module on line 251.

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: /public_html/leadprompter/debtrevolt/modules/civicrm.

Please review the Drupal Installation Guide and the Trouble-shooting page for assistance. If you still need help installing, you can often find solutions to your issue by searching for the error message in the installation support section of the community forum.

P.S. - Setting it back puts me back to the

Quote
DB_DataObject Error: DB Error: connect failed

and leaves me feeling like a dumb noob...
« Last Edit: November 03, 2009, 12:26:58 pm by flacorps »

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 04, 2009, 11:26:18 am
Bump.

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: DB_DataObject Error: DB Error: connect failed
November 04, 2009, 12:47:37 pm

sorry, no idea. your best bet would be to add debug statements here:

packages/DB/DataObject.php, approx line 2255 or so (search for connect failed)

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

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 05, 2009, 09:29:55 am
Adding the debug statements is a little over my head at the moment, but I did a clean install that produced a different problem and I'm trying to learn from that.

Meanwhile, I wonder if the Joomla! user here isn't facing a situation that parallels my own?
http://forum.civicrm.org/index.php/topic,10641.0.html

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 05, 2009, 01:29:03 pm
I didnlt know civicrm needed to run its own install routine first.

Problem solved.

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: DB_DataObject Error: DB Error: connect failed
November 05, 2009, 02:49:18 pm

can u detail a bit of what u did to solve the issue. the other person (and us) will appreciate some detailed notes on what happened and how you fixed it

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

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 05, 2009, 06:17:07 pm
I did a clean install of Drupal in a new folder.

Then I made sure to follow directions and put Civicrm not in the usual drupal modules folder, but in a new modules folder I created under sites/all.

This was all in the course of me following directions (for once).

http://wiki.civicrm.org/confluence/display/CRMDOC/Drupal+Installation+Guide

Run the Civicrm install routine, don't do it the drupal way. You need to also look into your settings.php file to get the path to the mysql database that drupal is using.

Ya gotta run that install routine just the way your told to do it. Drupal's own module install routines won't cut it. 

flacorps

  • Guest
Re: DB_DataObject Error: DB Error: connect failed
November 05, 2009, 06:26:15 pm
Sorry, I guess that won't help for Joomla! ... but I will also note that I think I could get Civicrm running on the original Drupal install that it messed up on ... IF I could delete the civicrm.settings.php file that I put in there by hand but apparently Civicrm assumed ownership of ... however I can't seem to do that (don't have permission and don't know how to either get permission or override the permission .... I can edit the file, but not delete it).

lameei

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: DB_DataObject Error: DB Error: connect failed
March 11, 2011, 10:45:49 pm
I solved the issue by correcting DB "user name" and "name" parameters in civicrm settings files.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • DB_DataObject Error: DB Error: connect failed

This forum was archived on 2017-11-26.