[eluser]Unknown[/eluser]
First off, just started using CodeIgniters yesterday and I've been very happy with it.
However, I finished up the main pages and went to add users. Auto loaded the session library, and have the same issue so many others have mentioned:
Code:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\system\codeigniter\Common.php:130)
Filename: libraries/Session.php
Line Number: 662
Now, I've just spent the last 3 hours or so searching the forums, google, even some forums of other projects that are built on CI - so please don't think I'm posting here because I don't know how to read something that is clearly defined in 25 different threads. The issue is that none of those steps worked
What I've tried:
1. checked all MY files, and a number of the CI files to ensure nothing was before or after the php tags (if they had ending tags....)
2. I'm using Notepad++, and there was some mention of that along with character encoding. I first encoded various files in ANSI (which was what they were by default for me) but also tried UTF-8 without BOM as suggested.
3. I used Notepad (ms notepad) and opened up various files and saved them after ensuring nothing was before or after the tags
4. I removed my htaccess file text, saved, tried again (that was mentioned that it could cause it, and I have an entry that I found to fix the path names in there).
5. Lastly, something strange (again, after hours of searching you try anything right?):
I'm using php 5.3.1 so with full E_ALL turned on, I get the "deprecated" warnings since CI creates object by ref. I went to line 130 in common per the error, and removed the "&" to correct this....and the first output then became 136...removed it there and it ended up in exceptions (or somewhere, i don't remember). eventually i got to a point where there was not class declaration on the deprecated code, i didn't know what to remove. It didn't fix a thing, just lead me on a wild goose chase that probably woulda lasted a while. but, the fact that it changed the first output line makes me think it could be important to someone who knows this better than I do.
I'm at a loss here. From what I know about building my own session libraries in the past, I'm assuming it won't work with this error. This puts my work on a standstill as I need to get the session figured out before proceeding
One last thing: My output files all have opening and closing php tags all throughout them, but I'm assuming thats normal. I've tried it with the prebuilt 404 page as well.
I also need to know what files I should be focusing on here. There error is in a CI file, from a CI file....but I obviously haven't changed those! Trying another editor, what files should I be opening and saving?
EDIT: it just occurred to me that the error logging is what's outputting prior to the session call (see #5). Going to try turning off errors and warnings, and test a quick session (since that shuts off the header error message as well).