Jump to content

Session start code causing header conflict


Rheves

Recommended Posts

Thanks, I took care of that code halfway through the body, I'm forced to use dreamweaver for contribute functionality, it has bugged out and done things like that before.

 

I read that topic and checked out the page in notepad, there doesn't seem to be anything before the <php, if there was would notepad pick it up or would I have to upload it outside of dreamweaver?

 

I've also made sure UserID is set before using :)

Link to comment
Share on other sites

If you read the sticky post that AbraCadaver posted the link to, was your file saved as a UTF-8 encoded file with the BOM characters and did saving it without the BOM characters fix the error?

 

Your page might be functioning, but your sessions cannot be with the error.

 

The error message with the output started on line 1 of your file, for the code you posted as being line 1, either has actual characters in the file before the <?php tag or it has the BOM characters as part of the file.

Link to comment
Share on other sites

When I save the page I have the option to set the Unicode Normalization Form, for which I chose none. There is also a "Include Unicode Signature (BOM)" checkmark, which I made sure was unchecked.

 

The same error remained.

 

In my code I check the session for the users ID, and execute my sql queries using that. The queries are executing properly and displaying non-default information, so I must be grabbing my ID properly.....right?

Link to comment
Share on other sites

Dreamweaver was never really intended to use with server side scripting languages and it doesn't really care if you have a session_start() on your page and you need to prevent the BOM characters from being saved as part of the file.

 

You need to use a different programming editor in order to save your file without the BOM characters.

 

If you are not using UTF-8 encoding on the page, save your page as an ANSI encoded page (should get rid of the BOM characters as well.)

Link to comment
Share on other sites

I opened it in notepad++ and set the encoding to ANSI, that's finally worked. Thanks a lot.

 

I've been using dreamweaver for awhile now and not encountered this on any other pages. I don't see ANSI in the list of other encodings, I'll have to remember this workaround for any time it pops up in the future :/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.