AbraCadaver Posted August 10, 2010 Share Posted August 10, 2010 Did you read the sticky topic in this forum? http://www.phpfreaks.com/forums/index.php/topic,37442.msg1385483.html#msg1385483 Quote Link to comment Share on other sites More sharing options...
Rheves Posted August 10, 2010 Author Share Posted August 10, 2010 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 Quote Link to comment Share on other sites More sharing options...
Rheves Posted August 10, 2010 Author Share Posted August 10, 2010 Since my code executes fine despite the warnings, would I be a bad man to just use error_reporting(0)? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 10, 2010 Share Posted August 10, 2010 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. Quote Link to comment Share on other sites More sharing options...
Rheves Posted August 10, 2010 Author Share Posted August 10, 2010 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? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 10, 2010 Share Posted August 10, 2010 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.) Quote Link to comment Share on other sites More sharing options...
Rheves Posted August 10, 2010 Author Share Posted August 10, 2010 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 :/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.