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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
Pages: [1] 2

Author Topic: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php  (Read 1610 times)

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 27, 2012, 02:00:43 pm
I am currently trying to upgrade Civicrm 3.0.2 to 4.1.3 within a Drupal 6.25 installation.

I have followed the Drupal 6 CiviCRM 4.1 upgrade instructions step-by-step.

When I reach Step 8, "Run the Upgrade script", I am presented with a happy-looking Green box asking me if I would like to proceed. I click Continue and after a few minutes my browser goes blank (totally empty page). The Apache error logs show this:

[error] [client XX.XX.XX.XX] PHP Fatal error:  CRM_Upgrade_ThreeOne_ThreeOne::require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'CRM/Core/DAO/Preferences.php' (include_path='.:DRUPAL_SITE_ROOT/modules/civicrm:DRUPAL_SITE_ROOT/modules/civicrm/packages:.:/usr/share/php:/usr/share/pear') in DRUPAL_SITE_ROOT/modules/civicrm/CRM/Upgrade/ThreeOne/ThreeOne.php on line 117

(details removed)

This strikes me as highly suspicious, since I was asked in Step 6 to remove the entire civicrm 3.0.2 codebase and unpack 4.1.3 in its place. If the file is missing, it seems to be missing from the archive.

Any help greatly appreciated.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 11:28:39 am
Did you change "Drupal" to "Drupal6" in civicrm.settings.php ?
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.

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 11:52:45 am
At Step 7, and not before, as indicated in the instructions...

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 11:56:18 am
I wonder if the file permissions are correct on the CiviCRM files?

The error is not suspicious I don't think because the updates are run sequentially. So you have 3.0 so the first step is to 3.1, thus the file mentioned is not inherently suspicious.

One other idea is to remove your civicrm.settings.php file and install it fresh in another DB, to get a good 4.1 civicrm.settings.php file. Then edit that to point to the 3.0 DB and then try to upgrade, i.e. run the upgrade script.
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.

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 01:52:01 pm
Tried using a clean 4.1.3 civicrm.settings.php but received the same error.

The reason I used the word "suspicious" is because the file "CRM/Core/DAO/Preferences.php" is not provided by the CiviCRM 4.1.3 Drupal 6 tarball... The instructions have told me to delete the old civicrm directory, so a missing file seems like it should have been in the tarball... *shrugs*

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 02:19:30 pm
Some progress: I've successfully upgraded from Civi 3.0.2 to 3.1.6. Attempting now to go up to 4.1.3 results in this error:

Additional Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -14
    [message] => DB Error: no database selected
    [mode] => 16
    [debug_info] => SELECT  id, version 
 FROM civicrm_domain
 
 WHERE (  civicrm_domain.id = 1 ) 
 
 
 
 [nativecode=2006 ** MySQL server has gone away]
    [type] => DB_Error
    [user_info] => SELECT  id, version 
 FROM civicrm_domain
 
 WHERE (  civicrm_domain.id = 1 ) 
 
 
 
 [nativecode=2006 ** MySQL server has gone away]
    [to_string] => [db_error: message="DB Error: no database selected" code=-14 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT  id, version 
 FROM civicrm_domain
 
 WHERE (  civicrm_domain.id = 1 ) 
 
 
 
 [nativecode=2006 ** MySQL server has gone away]"]
)

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: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 28, 2012, 08:36:38 pm

i would do it in smaller steps:

from 3.0 -> 3.4

and then from 3.4 -> 4.1

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

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 29, 2012, 07:39:25 am
Appreciate the suggestion, but I tried 3.0.2 -> 3.4.2 and it failed as well. I'm up to 3.1.6 now. Probably try to upgrade to 3.2.x next.

It is a bit disappointing because the upgrade instructions to 4.1 indicate that any version 2.2+ should be upgradable to 4.1.x...

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: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 29, 2012, 08:50:46 am

For 4.2 we ensure that the upgrade did work from 2.2 -> 4.2

Do u want to try and see if you can upgrade from your version to 4.2.alpha2

Yes its a bit disapponting that all upgrade combinations do not work. However it is fairly hard for us to test all possible combinations with our resources. Would help if you can investgate and see if 4.2 works and if not, what changes are needed to make it work

the preferences table (and hence the DAO) was dropped in a 3.x release

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

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 29, 2012, 01:18:25 pm
Attempting to upgrade 3.1.6 to 3.4.2 I received the following message after a few minutes of "upgrading":

Sorry. A non-recoverable error has occurred.
DB Error: no database selected

How on Earth is it not even finding the database?

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
June 29, 2012, 01:19:38 pm
The whole point of upgrading to 4.1.3 is to bring the site up to a recent secure and stable version. I don't believe that upgrading to an alpha release on a production server is a good idea.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
July 03, 2012, 06:11:02 am
Agreed that it doesn't make sense to go to 4.2 on a production server - but you can attempt the upgrade on a dev/clone server.  If it works, then you know your bug's been fixed.  It's probably worth the wait until 4.2 final is released to not have to fight with upgrade bugs.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
July 03, 2012, 10:43:00 am
I just tried upgrading a dev copy of my site to 4.2-alpha3. When I reach Step 8, "Run the Upgrade script", I get a drupal 6 "Page not found" error: "The requested page could not be found. "

This happens using either the clean-URL or the full-URL...

Nerdcore

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6.x / 7.x
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
July 03, 2012, 11:09:59 am
Tried again with 4.2 alpha 3 and got the following when I reached the upgrade step (step 8):

Fatal error: Uncaught exception 'Exception' with message 'XML data could not be loaded. Make sure you specified the correct path.' in [DRUPAL_6_SITE_PATH]/modules/civicrm/packages/IDS/Filter/Storage.php on line 220

Not sure why I received this message when previously I had gotten "Page not found". I repeated all the steps starting from a clean copy of my production site onto my dev server.

I am following the 4.2 Drupal 6 upgrade instructions.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php
July 03, 2012, 11:34:13 am
For

Quote
Uncaught exception 'Exception' with message 'XML data could not be loaded.

You need to delete the file sites/default/files/civicrm/templates_c/en_US/ConfigAndLog/Config.IDS.ini
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.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error upgrading to 4.1.3 - Failed opening required CRM/Core/DAO/Preferences.php

This forum was archived on 2017-11-26.