Form Tools
Premature End of Script Headers - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Premature End of Script Headers (/showthread.php?tid=1318)



Premature End of Script Headers - thepeel - May 19th, 2011

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?

Thanks,

-peel
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?

-peel


RE: Premature End of Script Headers - Ben - May 21st, 2011

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