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 from 4.2.10
Pages: [1]

Author Topic: Error upgrading from 4.2.10  (Read 518 times)

ianwren

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4.19
Error upgrading from 4.2.10
January 21, 2014, 04:02:47 pm
I've repeatedly tried upgrading from 4.2.10 on a local install of Drupal 7 and keep getting the following error:

Error 1: Call to undefined method CRM_Utils_Date::getUTCTime() in C:\xampp\htdocs\sites\all\modules\civicrm\CRM\ACL\BAO\Cache.php, line 133

I first migrated from a live site to local with no apparent problems but at the upgrade I get stuck. I've been able to skip and re-run the upgrade, to a point, at which point I get this:

[message] => Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again.

I can't find any reference to Error 1 but if anyone has any insights I'd appreciate it.

Thanks, Ian

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 from 4.2.10
January 22, 2014, 05:07:07 am
Can you make sure you have this file:

C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Utils\Date.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.

ianwren

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4.19
Re: Error upgrading from 4.2.10
January 22, 2014, 08:53:13 am
Yes, it's there. Thanks for asking.

ianwren

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4.19
Re: Error upgrading from 4.2.10
January 22, 2014, 11:32:24 am
More info on this:

If I comment out line 133 in Cache.php, which is the source of the error and run the update again I get this from the log. I'm not sure what the SQL syntax error would be but any help would be great:

Jan 22 11:30:03  [info] $CRM_Queue_Page_AJAX_runNext_error = PEAR_Exception: "DB Error: syntax error"
 * ERROR TYPE: DB_Error
 * ERROR CODE: -2
 * ERROR MESSAGE: DB Error: syntax error
 * ERROR MODE: 16
 * ERROR USERINFO:
DELETE
FROM   civicrm_acl_cache
WHERE  modified_date IS NULL
   OR  (TIMESTAMPDIFF(MINUTE, modified_date, ) >= 5)
 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') >= 5)' at line 4]
 * ERROR DEBUGINFO:
DELETE
FROM   civicrm_acl_cache
WHERE  modified_date IS NULL
   OR  (TIMESTAMPDIFF(MINUTE, modified_date, ) >= 5)
 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') >= 5)' at line 4]
#0 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#1 C:\xampp\htdocs\sites\all\modules\civicrm\packages\PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#2 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB.php(969): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#3 C:\xampp\htdocs\sites\all\modules\civicrm\packages\PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#4 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...", "DB_Error", TRUE)
#5 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\mysql.php(898): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#6 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\mysql.php(327): DB_mysql->mysqlRaiseError()
#7 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\common.php(1216): DB_mysql->simpleQuery("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#8 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\DataObject.php(2421): DB_common->query("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#9 C:\xampp\htdocs\sites\all\modules\civicrm\packages\DB\DataObject.php(1613): DB_DataObject->_query("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#10 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Core\DAO.php(155): DB_DataObject->query("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#11 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Core\DAO.php(959): CRM_Core_DAO->query("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...", TRUE)
#12 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\ACL\BAO\Cache.php(143): CRM_Core_DAO::singleValueQuery("\nDELETE\nFROM   civicrm_acl_cache\nWHERE  modified_date IS NULL\n   OR  (TIM...")
#13 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Utils\System.php(1233): CRM_ACL_BAO_Cache::resetCache()
#14 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Upgrade\Form.php(603): CRM_Utils_System::flushCache()
#15 [internal function](): CRM_Upgrade_Form::doIncrementalUpgradeFinish(Object(CRM_Queue_TaskContext), "4.3.alpha2")
#16 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Queue\Task.php(79): call_user_func_array((Array:2), (Array:2))
#17 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Queue\Runner.php(186): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#18 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(44): CRM_Queue_Runner->runNext(TRUE)
#19 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Queue\ErrorPolicy.php(80): CRM_Queue_Page_AJAX::{closure}()
#20 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(47): CRM_Queue_ErrorPolicy->call(Object(Closure))
#21 [internal function](): CRM_Queue_Page_AJAX::runNext((Array:5))
#22 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Core\Invoke.php(258): call_user_func((Array:2), (Array:5))
#23 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Core\Invoke.php(70): CRM_Core_Invoke::runItem((Array:13))
#24 C:\xampp\htdocs\sites\all\modules\civicrm\CRM\Core\Invoke.php(52): CRM_Core_Invoke::_invoke((Array:5))
#25 C:\xampp\htdocs\sites\all\modules\civicrm\drupal\civicrm.module(436): CRM_Core_Invoke::invoke((Array:5))
#26 [internal function](): civicrm_invoke("upgrade", "queue", "ajax", "runNext")
#27 C:\xampp\htdocs\includes\menu.inc(517): call_user_func_array("civicrm_invoke", (Array:4))
#28 C:\xampp\htdocs\index.php(21): menu_execute_active_handler()
#29 {main}

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error upgrading from 4.2.10

This forum was archived on 2017-11-26.