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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Errors upgrading 4.2.7 -> 4.3beta4
Pages: [1]

Author Topic: Errors upgrading 4.2.7 -> 4.3beta4  (Read 1079 times)

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Errors upgrading 4.2.7 -> 4.3beta4
March 24, 2013, 08:42:26 am
I just upgraded a 4.2.7 demo system to 4.3beta4. Environment is a fully-patched CentOS 6.4. system:
httpd-2.2.15-26.el6.centos.x86_64
mysql-5.1.67-1.el6_3.x86_64
php-5.3.3-22.el6.x86_64

Running the upgrade URL originally gave a blank page with the following error in /var/log/httpd/error_log:

Quote
[Sun Mar 24 10:45:54 2013] [error] [client 68.55.8.42] PHP Fatal error:  Call to undefined method CRM_Core_DAO::getGlobalSetting() in /var/www/html/drupal7/sites/all/modules/civicrm/CRM/Upgrade/Form.php on line 407

Which is the check for the MySQL thread_stack setting

Quote
    if (CRM_Core_DAO::getGlobalSetting('thread_stack', 0) < (1024*self::MINIMUM_THREAD_STACK)) {
      $error = ts('CiviCRM %1 requires MySQL thread stack >= %2k', array(
        1 => $latestVer,
        2 => self::MINIMUM_THREAD_STACK,
      ));
    }

My thread_stack is set to 512K
Quote
mysql> show variables like 'thread_stack';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| thread_stack  | 524288 |
+---------------+--------+

I commented out the check, and got farther along, but got an "Access Denied" error later in the process while executing a "CREATE FUNCTION". I added the MySQL "Create Routine", "Alter Routine" and "Execute" privileges using WebMin and re-tried the upgrade (after restoring my database). After this, the upgrade was successful.

I'm not sure if the thread_stack check error was due to the insufficient privileges for 4.3 (which were sufficient for 4.2 installs and upgrades to work). I'm tossing this out mostly for others that might be upgrading. I can open an issue if the thread_stack check is a bug. I did find http://issues.civicrm.org/jira/browse/CRM-12056 which hinted at a problem with the check, but was with MySQL 5.0.

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: Errors upgrading 4.2.7 -> 4.3beta4
March 24, 2013, 09:01:22 am

Can you check CRM/Core/DAO.php, that function is defined at the end of the file. I see it in current git master, and pretty sure it was there in beta4

most likely, some of your files were not overwritten when u untarred beta4. Can you get a new copy and repeat the untar process

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

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Re: Errors upgrading 4.2.7 -> 4.3beta4
March 24, 2013, 06:04:56 pm
I see that function in CRM/Core/DAO.php:

Quote
  /**
   * Lookup the value of a MySQL global configuration variable.
   *
   * @param string $name e.g. "thread_stack"
   * @param mixed $default
   * @return mixed
   */
  public static function getGlobalSetting($name, $default = NULL) {
    // Alternatively, SELECT @@GLOBAL.thread_stack, but
    // that has been reported to fail under MySQL 5.0 for OS X
    $escapedName = self::escapeString($name);
    $dao = CRM_Core_DAO::executeQuery("SHOW VARIABLES LIKE '$escapedName'");
    if ($dao->fetch()) {
      return $dao->Value;
    } else {
      return $default;
    }
  }

When I upgraded, I moved the entire civicrm directory from sites/all/modules to a directory outside the web root.

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: Errors upgrading 4.2.7 -> 4.3beta4
March 24, 2013, 06:19:45 pm

r u using a php opcode cache?

might want to restart apache and see if that helps

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

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Re: Errors upgrading 4.2.7 -> 4.3beta4
March 25, 2013, 04:56:40 am
I *DID* have to restart Apache after I commented out the code block before that change took effect...

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: Errors upgrading 4.2.7 -> 4.3beta4
March 25, 2013, 07:14:26 am

what opcode cache are u using?
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Re: Errors upgrading 4.2.7 -> 4.3beta4
March 25, 2013, 05:24:57 pm
php-pecl-apc-3.1.9-2.el6.x86_64

I did a little digging, and it seems that APC *should* have picked up that the file changed. I've added
Quote
apc.stat = 1
apc.stat_ctime = 1
to my /etc/php.ini to see if it behaves better the next time around.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Errors upgrading 4.2.7 -> 4.3beta4

This forum was archived on 2017-11-26.