Answers.Body: <p>So after much digging, I found it was due to Civi trying and failing to send an PDF receipt.</p>
  
  <p>After disabling this in Administer > System Settings > Misc (civicrm/admin/setting/misc?reset=1), the error resolved, the 500 Internal Server Error disappeared and the emails started sending with the email receipt instead of the PDF.</p>
  
  <p>Attach PDF copy to receipts: No</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-30T14:51:38.933Z
Answers.LastActivityDate: 2019-05-30T14:51:38.933Z
Answers.UserDisplayName: Jade
Body: <p>I am using CiviCRM version 5.13.4 on Drupal 7. PHP version is 7.1.</p>
  
  <p>When trying to sign up for an event, once the continue button is clicked to confirm the registration, the page loads for a minute or two and then returns a 500 Internal Server Error.</p>
  
  <p>The person does get signed up for the event but they don't receive a confirmation email which is causing issues as they try and register multiple times which creates duplicate bookings. </p>
  
  <p>Before clicking the continue button, this warning appears: </p>
  
  <pre><code>Warning: A non-numeric value encountered in CRM_Event_Form_Registration_Confirm-&gt;buildQuickForm() (line 264 of /public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php)
  </code></pre>
  
  <p>We are also getting this notice a lot although I'm not certain it's related:</p>
  
  <pre><code>Notice: Undefined offset: 0 in CRM_Grant_BAO_Query::where() (line 116 of /public_html/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php).
  </code></pre>
  
  <p>My guess is the first warning is the one to take notice of so I've put a little bit of the code below that may be of use which includes line 264 for reference (the middle line in the snippet):</p>
  
  <pre><code>/*CRM-16320 */
        $individual[$k]['totalAmtWithTax'] = $this-&gt;_amount[$k]['amount'];
        $individual[$k]['totalTaxAmt'] = $individualTaxAmount + $v['tax_amount'];
        $this-&gt;_totalAmount = $this-&gt;_totalAmount + $this-&gt;_amount[$k]['amount'];
        if (!empty($v['is_primary'])) {
          $this-&gt;set('primaryParticipantAmount', $this-&gt;_amount[$k]['amount']);
  </code></pre>
  
  <p>Any advice would be greatly appreciated, feel free to ask any follow up questions for clarification!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-30T14:37:58.600Z
Comments.Text: Is email setting working correctly? -  Also did you manage to find any PHP error log or Civicrm error log which will help a lot (The above notice and warning is of no use)
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Tags: <civievent><drupal>
Title: Signing up for an event returns 500 error
ThreadText: # Signing up for an event returns 500 error
  
  (Asked by: username_0 on 2019-05-30)
  
  I am using CiviCRM version 5.13.4 on Drupal 7. PHP version is 7.1.
  When trying to sign up for an event, once the continue button is clicked to confirm the registration, the page loads for a minute or two and then returns a 500 Internal Server Error.
  The person does get signed up for the event but they don't receive a confirmation email which is causing issues as they try and register multiple times which creates duplicate bookings. 
  Before clicking the continue button, this warning appears: 
  Warning: A non-numeric value encountered in CRM_Event_Form_Registration_Confirm->buildQuickForm() (line 264 of /public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php)
  
  We are also getting this notice a lot although I'm not certain it's related:
  Notice: Undefined offset: 0 in CRM_Grant_BAO_Query::where() (line 116 of /public_html/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php).
  
  My guess is the first warning is the one to take notice of so I've put a little bit of the code below that may be of use which includes line 264 for reference (the middle line in the snippet):
  /*CRM-16320 */
        $individual[$k]['totalAmtWithTax'] = $this->_amount[$k]['amount'];
        $individual[$k]['totalTaxAmt'] = $individualTaxAmount + $v['tax_amount'];
        $this->_totalAmount = $this->_totalAmount + $this->_amount[$k]['amount'];
        if (!empty($v['is_primary'])) {
          $this->set('primaryParticipantAmount', $this->_amount[$k]['amount']);
  
  Any advice would be greatly appreciated, feel free to ask any follow up questions for clarification!
  
  **Tags:** civievent, drupal
  
  > **Comments:**
  > **username_1**: Is email setting working correctly? -  Also did you manage to find any PHP error log or Civicrm error log which will help a lot (The above notice and warning is of no use)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-05-30. Score: 2 | Accepted answer
  
  So after much digging, I found it was due to Civi trying and failing to send an PDF receipt.
  
  After disabling this in Administer > System Settings > Misc (civicrm/admin/setting/misc?reset=1), the error resolved, the 500 Internal Server Error disappeared and the emails started sending with the email receipt instead of the PDF.
  
  Attach PDF copy to receipts: No
  
  
  ---
  
  