Simfatic Forms > Help > Troubleshooting > session_start() failed: headers already sent

Simfatic Forms is being discontinued.

See the announcement →

session_start() failed: headers already sent

Error (2): session_start() [<a href='function.session-start'>function.session-start</a>]:
Cannot send session cache limiter - headers already sent
(output started at /folder/folder/folder/folder/file1.php:N1)
file: /folder/folder/folder/file2.php

This error usually happens if you edit the generated code or do a PHP include() of the generated code in your PHP file.

The form processor script calls session_start() to start the user session. However, no output (not even a blank character) should be sent before the session_start() call. Otherwise PHP assumes that the content part is already started (session belongs to the header part)


Compare the error string that you see with the error message shown above (in red color) find out what is file1.php in your error. The error says that at line N1 of file1.php it started sending output.

If, for example the file is this way:

(dots represent blank lines)
Delete the blank lines to make it this way:
or else if the file is this way (blank lines at the end)
edit it and delete the blank lines this way

If you were trying to include()/require() the generated php file in one of your php pages

You can't embed the form in your web page by using PHP include() or require(). To embed the form in your web page:

  • Follow the steps in the 'Take The Code Wizard' to upload the generated script to the web server.
  • There is a 'Copy and Paste Form Code' button in the 'Take The code' Page
  • press the button and copy the HTML code to the relevant part in your web page code.
Please see the Getting Started Video Demo for an example.

Back to troubleshooting main page