PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Premature end of script headers problem

  1. interchange
    Member

    Hi Gravity Forms team,

    We're having a problem with a 500 internal server error on a pretty simple form. The error it returns in our site log is the following:

    Premature end of script headers: php-legacy, referer: http://protectourdefenders.com/get-involved/

    That is the url of the form that returns the error after filling it out if you want to see for yourself. I looked on the forums and came up with the following post from a while ago:

    http://www.gravityhelp.com/forums/topic/premature-end-of-script-headers-error

    Looks like the person posting wasn't able to consistently reproduce the issue in that case. In my case, unfortunately it's all too easy to reproduce the error.

    A few other things that may help:

    - Entries are recorded in the Gravity Forms backend but email notifications are not sent. I have it set to return some text after the form is filled in, rather than redirect to another page.

    - I'm using a BuddyPress-modified theme but I tried previewing the form using the Gravity Forms preview function as was suggested in the thread referenced above but unfortunately the error comes up there too so I doubt it's a theme-related issue.

    - I was able to test the form and it worked perfectly once with email notification going through fine and the message after filling it out displayed fine. However after changing the email address that it notified, the problem started.

    Update 1: The plot thickens...

    I just tried changing the email notification back to the original address which had worked when I tested it once. It appears that it works fine when sending to a Gmail account but we're getting the error when the notification address is set to another email address the internal server error is given consistently.

    For what it's worth the email address that doesn't work is routed through Google Apps for Domains, though I have no idea why that would make a difference since it's just a normal email address for anyone who doesn't know what it really is.

    Update 2: after trying with another Gmail address it seems to work fine in terms of not returning the error. With no notification email the form works fine too.

    Trying with an obviously incorrect email for the notification address (i.e. asdflkjalk@gmail.com) returns the same internal server error.

    It would appear that an incorrect notification email address causes the form to return that nasty 500 Internal Server Error.

    Update 3: After it working for several minutes, with no changes made it has stopped working again unfortunately with a Gmail notification address that worked before. After trying it several minutes later it seems to work again. At first we thought it was an issue with it rejecting duplicate entries (even though we don't have that option checked) but when trying it out with completely new information it still sometimes returns the error.

    Posted 13 years ago on Saturday January 21, 2012 | Permalink
  2. This is going to be a web server issue. You will need to discuss this with your web host.

    Gravity Forms does not care what email you send the email notifications to, your web server is what actually sends the emails so any errors related to sending email to specific web addresses are going to be web server related and not code related.

    Posted 13 years ago on Wednesday January 25, 2012 | Permalink
  3. This is the very same problem I have been battling with! I noticed that it is only the administrator email that doesn't send, only when autocomplete is used to complete a form and an Advanced Field such as 'name' or 'email' is selected as a 'from name', 'from email' or 'reply to' under notification to administrator settings.

    CASE SCENARIO: When I have made a form using advanced fields: A customer uses autocomplete to fill the form and hit's submit, then an internal server error is generated ( Premature end of script headers: php-legacy [...] ) and the administrator email doesn't send.

    CASE SCENARIO 2: When I have made a form using advanced fields but change the settings so that the administrator notification 'from name', 'from email' and 'reply to' do not use the advanced fields to input data: A customer uses autocomplete to fill the form and hit's submit and the form works fine. (Unfortunately we need the 'from email' address to be the customers email)

    CASE SCENARIO 3: When I have made a form using single line text fields instead of advanced fields for name and email etc: A customer uses autocomplete to fill the form and hit's submit and the form works fine. (Unfortunately we need the 'from email' address to be the customers email, which is only possible when using advanced fields)

    I have hassled my web server (Media Temple), triple checked the required php settings and all indicators point to an issue with the gravity form software.

    PLEASE HELP!!

    Posted 13 years ago on Monday January 30, 2012 | Permalink
  4. I'll be sending this to our lead developer to take a look at. This is a highly unusual error and not something anyone other than you two have reported so it's not something we've encountered or seen before and it's a server related issue.

    Posted 13 years ago on Monday January 30, 2012 | Permalink
  5. bag
    Member

    We are a Gravity Forms user and Media Temple customer. We encountered this same problem with our Media Temple Grid Server installation. We had a hunch, and tried using a not-quite current version of PHP and the problem went away. Specifically, we downgraded from PHP 5.3.8 to PHP 5.2.17. Software, what are you gonna do? Anyway, we hope this helps some other Media Temple customers.

    bag@mac.com

    Posted 13 years ago on Thursday February 16, 2012 | Permalink