The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



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