Answers.Body: <p>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.</p>
  
  <p>To find this I striped back down to a clean and empty install:</p>
  
  <ul>
  <li>Delete (rename) the civicrm plugin.</li>
  <li>Select and drop all tables from the civi db</li>
  <li>Delete (rename) the uploads/civicrm folder (having taken copy of civicrm.settings.php)</li>
  <li>Clean install of civicrm 4.7.11, using existing empty db.</li>
  <li>Tested the memberships desktop as canary page. OK to begin with, but when set to UK localisation it breaks.</li>
  </ul>
  
  <p>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.  </p>
  
  <p>Don't know where or what is the problem with the localisation...</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-16T17:55:02.943Z
Answers.LastActivityDate: 2016-10-07T11:16:40.463Z
Answers.LastEditDate: 2016-10-07T11:16:40.463Z
Answers.UserDisplayName: Eric Booth
Body: <p>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"].</p>
  
  <p>Turned on debug and get out of memory errors when:</p>
  
  <ol>
  <li>Create new contribution page. At first continue button when using the CiviContribute dashboard, but immediately when through Administer -> CiviContribute -> New Contribution Page</li>
  <li>Edit existing contribution page, configure 'Title and settings' or 'Contribution Amounts'. Other sections open and save OK.</li>
  <li>Membership dashboard - immediately</li>
  </ol>
  
  <p>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.</p>
  
  <p>At a loss of where to go next. Any clues?</p>
  
  <p>The detail of where the out of memory report comes changes but here's a sample:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>Backtrace:</p>
  
  <blockquote>
    <p>CRM_Contribute_Exception_InactiveContributionPageException: "The page you requested is currently unavailable."</p>
  </blockquote>
  
  <pre><code>#0 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Main.php(63): CRM_Contribute_Form_ContributionBase-&gt;preProcess()
  #1 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(519): CRM_Contribute_Form_Contribution_Main-&gt;preProcess()
  #2 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form-&gt;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-&gt;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-&gt;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-&gt;handle("display")
  #6 /home/sites/bristolcyclingcampaign.org.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller-&gt;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-&gt;invoke()
  #11 [internal function](): CiviCRM_For_WordPress_Basepage-&gt;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-&gt;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.
  </code></pre>
  
  <p>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. </p>
  
  <blockquote>
    <p>echo "memory_limit: " . ini_get('memory_limit') . "   $memLimit: "  $memLimit;</p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-05T16:19:53.277Z
Comments.Text: 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 http://example.org/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-06T00:07:19.263Z
Comments.Text: 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');`
Comments.UserDisplayName: Eric Booth
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-06T00:25:21.837Z
Comments.Text: Also, no access using a direct link to the contribute page, so not a shortcode issue as such.
Comments.UserDisplayName: Eric Booth
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-07T08:47:37.910Z
Comments.Text: What gets reported when you run phpinfo() from within Wordpress? (e.g. https://codex.wordpress.org/Finding_Server_Info)
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-12T14:59:57.813Z
Comments.Text: 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.
Comments.UserDisplayName: Eric Booth
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-13T08:20:32.333Z
Comments.Text: Going back to your original question, what changed between your working test system and your not-working live system?
Comments.UserDisplayName: Graham
Tags: <civicontribute><civimember><contribution-page><localisation>
Title: Fatal error: Out of memory - unable to create or edit Contribution page or membership
ThreadText: # Fatal error: Out of memory - unable to create or edit Contribution page or membership
  
  (Asked by: username_0 on 2016-09-05)
  
  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;
  
  **Tags:** civicontribute, civimember, contribution-page, localisation
  
  > **Comments:**
  > **username_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 http://example.org/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1  
  > **username_0**: I'm puzzled by that as well @username_1. 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');`  
  > **username_0**: Also, no access using a direct link to the contribute page, so not a shortcode issue as such.  
  > **username_1**: What gets reported when you run phpinfo() from within Wordpress? (e.g. https://codex.wordpress.org/Finding_Server_Info)  
  > **username_0**: 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.  
  > **username_1**: Going back to your original question, what changed between your working test system and your not-working live system?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-09-16. Score: 1 | Accepted answer
  
  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.
  
  
  ---
  
  