2

We went live with new website including CiviCRM last month. On test system our membership, payment and contribution page were all working OK. Pretty sure they were also OK post launch, and post upgrade to Civi 4.7.10. Now however we get blank page (HTTP error 500) on front end when accessing the contribution page with shortcade [civicrm component="contribution" id="1" mode="live" hijack="0"].

Turned on debug and get out of memory errors when:

  1. Create new contribution page. At first continue button when using the CiviContribute dashboard, but immediately when through Administer -> CiviContribute -> New Contribution Page
  2. Edit existing contribution page, configure 'Title and settings' or 'Contribution Amounts'. Other sections open and save OK.
  3. Membership dashboard - immediately

Tried doubling the php memory up to 512M. Reinstalling 4.7.10. Checked 'CIVICRM_UF_BASEURL' in civicrm.settings.php. Deleted and recreated all payment processors, price sets and steps in the setup doc.

At a loss of where to go next. Any clues?

The detail of where the out of memory report comes changes but here's a sample:

Fatal error: Out of memory (allocated 118489088) (tried to allocate 49152 bytes) in /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Campaign/BAO/Query.php on line 414

Backtrace:

CRM_Contribute_Exception_InactiveContributionPageException: "The page you requested is currently unavailable."

#0 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Main.php(63): CRM_Contribute_Form_ContributionBase->preProcess()
#1 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(519): CRM_Contribute_Form_Contribution_Main->preProcess()
#2 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#3 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution_Main), "display")
#4 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), "display")
#5 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#6 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
#7 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#8 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#9 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:3))
#10 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/includes/civicrm.basepage.php(132): CiviCRM_For_WordPress->invoke()
#11 [internal function](): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#12 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-includes/plugin.php(600): call_user_func_array((Array:2), (Array:1))
#13 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-includes/class-wp.php(738): do_action_ref_array("wp", (Array:1))
#14 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-includes/functions.php(963): WP->main("")
#15 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-blog-header.php(16): wp()
#16 /home/sites/bristolcyclingcampaign.org.uk/public_html/index.php(17): require("/home/sites/bristolcyclingcampaign.org.uk/public_html/wp-blog-header.php")
#17 {main}
 Sorry but we are not able to provide this at the moment.
The page you requested is currently unavailable.
Return to home page.

Update: Spent a good while investigating the memory issue, but it wasn't the root of the problem. It was helpful to put in some echo lines in civicrm.settings.php. They came up every page but on the 'fatal' pages helped to confirm that memory_limit was being set correctly, but didn't affect the error.

echo "memory_limit: " . ini_get('memory_limit') . " $memLimit: " $memLimit;

  • 1
    It certainly looks like Civi is running out of memory. Are you sure that PHP's memory_limit is set to 512M? The out of memory message you are seeing there looks to be indicating that it is hitting the buffers at around 113M. Can you reach the contribution page on the front end if not using a shortcode?i.e. on a url like example.org/… – Graham Sep 5 '16 at 16:19
  • 1
    I'm puzzled by that as well @Graham. Set memory limit for WP in wp-config.php to 512 and that shows in report OK. But nothing seems to affect the 112M-118M in the fatal error message. Tried: 1) Set 'php_value memory_limit 256M' in .htaccess. 2) Put a php.ini first root, then in wp-admin, with 'memory_limit = 256M'. 3) Changed civicrm.settings.php ini_set('memory_limit', '256M'); – Eric Booth Sep 6 '16 at 0:07
  • Also, no access using a direct link to the contribute page, so not a shortcode issue as such. – Eric Booth Sep 6 '16 at 0:25
  • What gets reported when you run phpinfo() from within Wordpress? (e.g. codex.wordpress.org/Finding_Server_Info) – Graham Sep 7 '16 at 8:47
  • phpinfo() reports the value set in the php.ini file, currently set to 196M but tried 256 and 512. WP plugin 'Server IP & Memory Usage Display' shows memory available as set in wp_config.php, currently 256M but tried 512M. Neither setting changes where Civi appears to run out of memory. Curious about code at end of civicrm.settings.php which should pick up one of these, but the case statement doesn't look right and hard coding memory doesn't seem to be registering. – Eric Booth Sep 12 '16 at 14:59
1

The problem was in enabling default language to English (United Kingdom). If default US then all OK, change to UK or Aus and it breaks. The US setting is OK.

To find this I striped back down to a clean and empty install:

  • Delete (rename) the civicrm plugin.
  • Select and drop all tables from the civi db
  • Delete (rename) the uploads/civicrm folder (having taken copy of civicrm.settings.php)
  • Clean install of civicrm 4.7.11, using existing empty db.
  • Tested the memberships desktop as canary page. OK to begin with, but when set to UK localisation it breaks.

Having found this I was able to restore backed up db with full data that I feared was corrupt, and after changing language back to US, all seems OK.

Don't know where or what is the problem with the localisation...

Update: There may have been other underlying problems with the installation as well as there had been domain name and database name changes along with a switch from Joomla to Wordpress. After migration to a new server all problems, including reported memory use, appear resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.