Answers.Body: <p>I don't know about the compatibility of CiviCRM 4.2.7 with PHP 5.5.x - <a href="http://wiki.civicrm.org/confluence/display/CRMDOC42/Drupal+Installation+Guide+for+CiviCRM+4.2+-+Drupal+6" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC42/Drupal+Installation+Guide+for+CiviCRM+4.2+-+Drupal+6</a> reports that 4.2.x was tested under PHP 5.3.x, so you may well have issues under 5.5</p>
  
  <p><a href="https://www.drupal.org/requirements" rel="nofollow">https://www.drupal.org/requirements</a> confusingly reports the following for Drupal 6: "Drupal core should work with PHP 5.3.x, but PHP 5.3.x and higher may produce errors or unexpected behavior especially for contributed modules and themes.</p>
  
  <p>And <a href="https://www.drupal.org/requirements/php" rel="nofollow">https://www.drupal.org/requirements/php</a> indicates that Drupal 6 core should be fine with PHP 5.5, but that some contrib modules may have problems.</p>
  
  <p>I run the Drupal 6 sites that I'm looking after on a Debian Squeeze server with PHP 5.3.3. Some of these sites are using CiviCRM 4.5.x and apart from some very minor issues it works fine with Drupal 6 and with PHP 5.3.3</p>
  
  <p>My advice - having ensured that, with the exception of the CiviCRM issue that you have noted - your Drupal 6 site works without any issues on the new server, you might want to try a test version of the site with the latest 4.4 LTS version of CiviCRM (be sure to use the Drupal 6 flavour) and see how that performs, and if that works try the current 4.6.x version.</p>
  
  <p>At the same time you need to have a plan in place to move away from Drupal 6. A release date for Drupal 8 has now been announced, and in due course that will mean an end to support for Drupal 6.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-09T09:09:00.660Z
Answers.LastActivityDate: 2015-11-09T09:09:00.660Z
Answers.UserDisplayName: Graham
Body: <p>Recently we switched servers within our webhost. When doing so, the PHP version went to 5.5 from 5.3. We then started to see some errors when making submissions within CiviCRM (most do work, but some functions don't). Based off my reading, I am making an assumption that PHP 5.5 is causing these issues, but I am not a webdev. Other than have PHP downgraded back to 5.3, is there anything to do here to alleviate this? How difficult are CiviCRM upgrades?</p>
  
  <p>Error snippet:</p>
  
  <pre><code>#0 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Error.php(148):     CRM_Core_Error::backtrace()
  
  #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
  
  #2 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func    ((Array:2), Object(DB_Error))
  
  #3 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB.php(971): PEAR_Error-    &gt;PEAR_Error("DB Error: a515ac9c2796ca0e23adbe92c68fc9fc", "a515ac9c2796ca0e23adbe92c68fc9fc", 16,     (Array:2), "INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")
  
  #4 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error-    &gt;DB_Error("a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...")
  
  #5 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1903): PEAR-    &gt;raiseError(NULL, "a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...", "DB_Error", TRUE)
  
  #6 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common-    &gt;raiseError("a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, NULL, "1364 ** Field 'total_amount' doesn't     have a default value")
  
  #7 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql-    &gt;mysqlRaiseError()
  
  #8 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1216):     DB_mysql-&gt;simpleQuery("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")
  
  #9 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(2421):     DB_common-&gt;query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")
  
  #10 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(1055):     DB_DataObject-&gt;_query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")
  
  #11 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/DAO.php(287): DB_DataObject-    &gt;insert()
  
  #12 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (153): CRM_Core_DAO-&gt;save()
  
  #13 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (246): CRM_Contribute_BAO_Contribution::add((Array:30), (Array:1))
  
  #14 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php    (1615): CRM_Contribute_BAO_Contribution::create((Array:30), (Array:1)) 
  
  #15 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Form.php(246):     CRM_Contribute_Form_Contribution-&gt;postProcess()
  
  #16 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (151): CRM_Core_Form-&gt;mainProcess()
  
  #17 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (128): CRM_Core_QuickForm_Action_Upload-&gt;realPerform(Object(CRM_Contribute_Form_Contribution),     "upload")
  
  #18     /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php    (203): CRM_Core_QuickForm_Action_Upload-&gt;perform(Object(CRM_Contribute_Form_Contribution), "upload")
  
  #19 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):     HTML_QuickForm_Controller-&gt;handle(Object(CRM_Contribute_Form_Contribution), "upload")
  
  #20 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Controller.php(289):     HTML_QuickForm_Page-&gt;handle("upload")
  
  #21 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(296):     CRM_Core_Controller-&gt;run()
  
  #22 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(353):     CRM_Contribute_Page_Tab-&gt;edit()
  
  #23 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(220):     CRM_Contribute_Page_Tab-&gt;run((Array:3), NULL)
  
  #24 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(51):     CRM_Core_Invoke::_invoke((Array:3))
  
  #25 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/drupal/civicrm.module(382):             CRM_Core_Invoke::invoke((Array:3))
  
  #26 [internal function](): civicrm_invoke("contribute", "add")
  
  #27 /home/petsaliv/public_html/office2/includes/menu.inc(350): call_user_func_array("civicrm_invoke",      (Array:2))
  
  #28 /home/petsaliv/public_html/office2/index.php(17): menu_execute_active_handler()
  
  #29 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-09T09:08:33.333Z
Comments.Text: It seems that a field total_amount does not have a default value and this looks like the upgrade did not really went smoothly
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Tags: <drupal><php><error>
Title: CiviCRM 4.2.7 (drupal 6) - errors after web host upgrade to PHP 5.5
ThreadText: # CiviCRM 4.2.7 (drupal 6) - errors after web host upgrade to PHP 5.5
  
  (Asked by: username_0 on 2015-11-09)
  
  Recently we switched servers within our webhost. When doing so, the PHP version went to 5.5 from 5.3. We then started to see some errors when making submissions within CiviCRM (most do work, but some functions don't). Based off my reading, I am making an assumption that PHP 5.5 is causing these issues, but I am not a webdev. Other than have PHP downgraded back to 5.3, is there anything to do here to alleviate this? How difficult are CiviCRM upgrades?
  Error snippet:
  #0 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Error.php(148):     CRM_Core_Error::backtrace()
  
  #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
  
  #2 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func    ((Array:2), Object(DB_Error))
  
  #3 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB.php(971): PEAR_Error-    >PEAR_Error("DB Error: a515ac9c2796ca0e23adbe92c68fc9fc", "a515ac9c2796ca0e23adbe92c68fc9fc", 16,     (Array:2), "INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")
  
  #4 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error-    >DB_Error("a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...")
  
  #5 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1903): PEAR-    >raiseError(NULL, "a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, "INSERT INTO civicrm_contribution     (contact_id , contribution_type_id , contrib...", "DB_Error", TRUE)
  
  #6 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common-    >raiseError("a515ac9c2796ca0e23adbe92c68fc9fc", NULL, NULL, NULL, "1364 ** Field 'total_amount' doesn't     have a default value")
  
  #7 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql-    >mysqlRaiseError()
  
  #8 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/common.php(1216):     DB_mysql->simpleQuery("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")
  
  #9 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(2421):     DB_common->query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id , contrib...")
  
  #10 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/DB/DataObject.php(1055):     DB_DataObject->_query("INSERT INTO civicrm_contribution (contact_id , contribution_type_id ,     contrib...")
  
  #11 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/DAO.php(287): DB_DataObject-    >insert()
  
  #12 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (153): CRM_Core_DAO->save()
  
  #13 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php    (246): CRM_Contribute_BAO_Contribution::add((Array:30), (Array:1))
  
  #14 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php    (1615): CRM_Contribute_BAO_Contribution::create((Array:30), (Array:1)) 
  
  #15 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Form.php(246):     CRM_Contribute_Form_Contribution->postProcess()
  
  #16 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (151): CRM_Core_Form->mainProcess()
  
  #17 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php    (128): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution),     "upload")
  
  #18     /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php    (203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), "upload")
  
  #19 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):     HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), "upload")
  
  #20 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Controller.php(289):     HTML_QuickForm_Page->handle("upload")
  
  #21 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(296):     CRM_Core_Controller->run()
  
  #22 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php(353):     CRM_Contribute_Page_Tab->edit()
  
  #23 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(220):     CRM_Contribute_Page_Tab->run((Array:3), NULL)
  
  #24 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/CRM/Core/Invoke.php(51):     CRM_Core_Invoke::_invoke((Array:3))
  
  #25 /home/petsaliv/public_html/office2/sites/all/modules/civicrm/drupal/civicrm.module(382):             CRM_Core_Invoke::invoke((Array:3))
  
  #26 [internal function](): civicrm_invoke("contribute", "add")
  
  #27 /home/petsaliv/public_html/office2/includes/menu.inc(350): call_user_func_array("civicrm_invoke",      (Array:2))
  
  #28 /home/petsaliv/public_html/office2/index.php(17): menu_execute_active_handler()
  
  #29 {main}
  
  **Tags:** drupal, php, error
  
  > **Comments:**
  > **username_1**: It seems that a field total_amount does not have a default value and this looks like the upgrade did not really went smoothly  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-11-09. Score: 1
  
  I don't know about the compatibility of CiviCRM 4.2.7 with PHP 5.5.x - <http://wiki.civicrm.org/confluence/display/CRMDOC42/Drupal+Installation+Guide+for+CiviCRM+4.2+-+Drupal+6> reports that 4.2.x was tested under PHP 5.3.x, so you may well have issues under 5.5
  
  <https://www.drupal.org/requirements> confusingly reports the following for Drupal 6: "Drupal core should work with PHP 5.3.x, but PHP 5.3.x and higher may produce errors or unexpected behavior especially for contributed modules and themes.
  
  And <https://www.drupal.org/requirements/php> indicates that Drupal 6 core should be fine with PHP 5.5, but that some contrib modules may have problems.
  
  I run the Drupal 6 sites that I'm looking after on a Debian Squeeze server with PHP 5.3.3. Some of these sites are using CiviCRM 4.5.x and apart from some very minor issues it works fine with Drupal 6 and with PHP 5.3.3
  
  My advice - having ensured that, with the exception of the CiviCRM issue that you have noted - your Drupal 6 site works without any issues on the new server, you might want to try a test version of the site with the latest 4.4 LTS version of CiviCRM (be sure to use the Drupal 6 flavour) and see how that performs, and if that works try the current 4.6.x version.
  
  At the same time you need to have a plan in place to move away from Drupal 6. A release date for Drupal 8 has now been announced, and in due course that will mean an end to support for Drupal 6.
  
  
  ---
  
  