The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Premature End of Script Headers
I'm having an issue where submitting a particular form on a site will return a 500 Internal Server Error.

Checking formtools shows that the form was processed, but it doesn't redirect.

Checking the server error logs reveals the error: Premature end of script headers: php5

Other forms on the site being processed by formtools function properly. Do you think it's an issue with the data the form is submitting?


OK, I've done some more checking and have narrowed the issue down to the email being sent after the form has been processed. I think I've even narrowed it down to the email template. If I use one of the examples for the HTML template, it seems to work fine, if I enter my own very basic HTML email, then I get the 500 Internal Server Error and the same Premature end of script headers error in the error log.

So I'm not sure why I'm suddenly getting this error. Especially since it used to work, and the test email sends out fine.

Any ideas?

Hi Peel,

Sorry you're having problems!

Possibly the email template is throwing a minor error that outputs something to the browser, preventing the header redirect. Redirects only work if nothing's already been sent.

Could you try removing the entire content of the email templates (back it up!), and just put in a word or something in the content field(s) (HTML content and/or text content). Then try submitting again. Does that get through? If so, slowly add in chunks of your old email template content to see which bit breaks it.

Let me know how it goes.

- Ben

Forum Jump:

Users browsing this thread: 1 Guest(s)