close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Cannot send session cookie - headers already sent

Thread began 11/25/2009 11:18 pm by lgw336173 | Last modified 1/03/2010 1:42 pm by Office Guy-172461 | 3420 views | 5 replies |

lgw336173

Cannot send session cookie - headers already sent

Registration page seems to be fine but I get this (below) when going to Login page. What on earth is this trying to tell me?
Login_LogIn.php?
thank you.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php:4) in /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php on line 6

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php:4) in /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php:4) in /home/content/a/n/d/andreamwagner/html/midcc/Arrow-Shell/WA_SecurityAssist/Helper_PHP.php on line 46

Sign in to reply to this post

anonymous

Hi there,

The "headers already sent" error typically means there is some white space between PHP tags before the HTML output is started. If you look above your head code, try to go through and ensure that when one PHP block ends, there is not an actual space after any closing tags.

One way to ensure there is no white space would be to bring the opening tag of a new php block right next to the closing tag of the last block, like this:

?><?php

Technically, though, as long as it is a return after the closing block (making sure the space bar was not hit) and then the very next line starts your new block, you should be ok.

Best regards,

Brian

Sign in to reply to this post

Jason ByrnesWebAssist

It is also possible there is another PHP error occurring that is causing the error. It could be that your error reporting level is set to only show warnings.


Add the following code at line 1 of you page to set error reporting to show all errors:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

Like Brian said, make sure there are no blank lines or spaces between any of the Closing PHP Blocks "?>" and starting PHP blocks "<?php"

In Dreamweaver, go to View -> Code View Options -> Invisible Elements to force dreamweaver to show spaces and returns, this can make it easier to see if spaces are at the end of any closing php lines.

Sign in to reply to this post

Office Guy-172461

New and improved (now with pictures!)

Solving the "headers already sent" problem
148/

Sign in to reply to this post

Andre.M

1and1 php4 to php5 creates "headers already sent"

I recently uploaded PowerGallery to my 1and1 server to augment PowerStore and had to create the .htaccess file to have php parse via php5 and not php4.
I noticed that once i did that my insert page for PowerStore started returning the error. I moved the .htaccess file from the root to the PowerGallery folder and voila! solved.
only PowerGallery is being parsed via php5.

why would that cause the issue?

Andre

Sign in to reply to this post

Office Guy-172461

Did you follow the link above?
Without seeing the error, we can't tell which pages are causing the error.

Usually it is better to start a new thread than to attach to an old one. Makes it much easier to follow without confusing two different situations.

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...