close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Headers already sent

Thread began 1/20/2011 6:51 pm by craig.smith416222 | Last modified 1/21/2011 2:06 pm by Jason Byrnes | 1704 views | 7 replies |

craig.smith416222

Headers already sent

I added a server validation to my form and now the server is throwing these error messages:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/customel/public_html/header.php:6) in /home/customel/public_html/webassist/form_validations/wavt_validatedform_php.php on line 3

I have made sure that in Dreamweaver that I have set links relative to the document.

Any suggestions would be greatly appreciated. I've seen the solution

Sign in to reply to this post

Jason ByrnesWebAssist

the headers already sent error occurs when there is some sort of output on the page before the header() or session_start() functions are used.

if you look closely at the error, this section:
output started at /home/customel/public_html/header.php:6

is reporting that the output is at line 6 of the header.php. Ussusally you will find the problem on the previous line though.

In most cases, the problem is caused by a blank space between a closing php tag and the next opening tag:

php:
?>


<?php



if you are not able to spot the problem, send a copy of your page in a zip archive.

Sign in to reply to this post

craig.smith416222

Headers Sent

I could not find an error anywhere in the header.php on line six. It is a meta tag and the previous line is the title of the page.

I have included a zip of the files used for the page. The form itself is referForm.php Thanks for your help.

Attached Files
CustomElectronics.zip
Sign in to reply to this post

Jason ByrnesWebAssist

yeah, the problem is that you are using server side includes.

the main page:
refer.php

attaches the referForm.php at line 17 which after a bunch of html tags

the referForm page has the universal email code on it, because this code is now after the html tags from the refer.php page at run time, you will get this error message.

you cannot use server behaviors like Universal Email in server side included pages like this.

Sign in to reply to this post

craig.smith416222

Stupid Question

How do I not use server side includes? I don't remember seeing an option? This may be due to my ignorance of SuperSuite.

Thanks again for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

by creating your pages not to use server side includes.


you are the one crating the page structure that includes the referForm.php page on the refer.php page.

Sign in to reply to this post

craig.smith416222

?

Why do I not get any errors on my test site with the exact same code?

Sign in to reply to this post

Jason ByrnesWebAssist

your test site may not have error reporting turned on.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...