Upon submission of form I get this error:

Cannot modify header information - headers already sent by (output started at /home/invisible/www/www/modules/webform/webform.module(1578) : eval()'d code:1) in /home/invisible/www/www/includes/common.inc on line 319.

and a blank screen, rather than a return to homepage.

Thanks in advance.

Comments

d.sibaud’s picture

Category: support » bug
Priority: Normal » Critical

same problem, but I have no output, neither in the apache error log, it send me to a blank screen in the both cases I put a page to redirect to or a message to show. Please Help

d.sibaud’s picture

Priority: Critical » Normal

Ops, for me was an error in the fckeditor configuration. Solved

quicksketch’s picture

Whenever an error is caused by "eval()'d code", this mean that you're using a custom PHP snippet on your site. While Drupal is trying to run eval() on the custom code, it is either causing an error or printing something to the output (which will cause errors).

moronicbajebus’s picture

+1 I am getting a blank screen after submission.

moronicbajebus’s picture

It give me the blank screen if "E-mail to address:" has an email address. It sends the email fine. With it blank, the user see the correct page after submission.

moronicbajebus’s picture

I fixed it for myself. Since the theme engine is used to create the emails, it was loading up my theme for my website in particular template.php. Well, template.php outputted whitespace (because of "?> ") which cause the headers to be sent prematurely. The headers were sent before the redirect could be added to the headers.

quicksketch’s picture

Category: bug » support
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

hanskuiters’s picture

An additional solution for people finding this post (like I did):

In the fieldset 'Webform advanced settings' you find two textareas, in my case both with a fck editor. And the editor puts a break
in the textareas. And that causes the above mentioned problem. Remove them and problem is solved.

btopro’s picture

Same goes for tinymce in 6 and 5

thedevnull’s picture

I had the same problem because of this interaction with FCKEditor. I fixed it with what Capono said:

In the fieldset 'Webform advanced settings' you find two textareas, in my case both with a fck editor. And the editor puts a break
in the textareas. And that causes the above mentioned problem. Remove them and problem is solved.

Thanks!

TwanVeugelers’s picture

Hi.

I had the same issue.
Disabled FCKeditor for those areas, as well as the redirect area.

issues solved.

grtz,
Twan

aaronchristian’s picture

Also be aware that when you are posting snippets to have all your code & validation within ONE php tag.

For example, the following will generate a "headers already sent error".

<?php 
  // First snippet of code here
?>

<?php 
  // Second snippet of code here
?>

Instead you should make sure all your code is like this;

<?php 
  // First snippet of code here

  // Second snippet of code here
?>

The space between the 2 snippets "php" tags in the first example is what is causing the error.

ian.d.rossi’s picture

Aaron,

Does this apply for both the additional validation and additional processing sections?

If you have the following in the additional validation section:

  // First snippet of code here

and then the following in the additional processing section:

  // First snippet of code here

Does that mean that this white screen error will be caused?

Also, how were you able to find out how the "headers already sent error" was caused? Do you know some tricks that can help debug this type of stuff?

Thanks!

somebodysysop’s picture

I had the same error as everyone else: white screen of death. I removed fckeditor from advanced settings. Same error.

What I had to do was remove fckeditor from my webform form component. That solved the problem for me. But, got this error submission:

warning: Invalid argument supplied for foreach() in /modules/webform/webform.module on line 2225.

I take that back. Even with webform form component removed, still getting white screen of death with NO way to debug the error.

somebodysysop’s picture

I fixed it for myself. Since the theme engine is used to create the emails, it was loading up my theme for my website in particular template.php. Well, template.php outputted whitespace (because of "?> ") which cause the headers to be sent prematurely. The headers were sent before the redirect could be added to the headers.

How did you fix this?

Bensbury’s picture

I found that FCK editor was putting

(or I had set it to  ) in the Additionally validation input boxes.

When you look at the admin screen you can tell, because aside from being in a dropdown, it doesn't show up in the box.

Flip it over to basic input and it was displaying  
Hence white screen of death on submission.

And I'm now highly unpopular at the office for the previously non-working company contact form.

davidw’s picture

davidw’s picture

Thank you! I've been stumped by this for months.

mattmm’s picture

i've disabled FCKeditor on my webform and I still get white screen nor does it redirect to the supplied URL. Anyone else get a different fix?

hanskuiters’s picture

After disabling the FCK, there might still be a html-linebreak left. See http://drupal.org/node/293984#comment-1041632

teodor.sandu’s picture

Title: webform redirect fails after submint (white screen of death) » webform redirect fails after submit (white screen of death)

Thanks #6, that was my issue as well.