I am running Xampp which is a LAMP setup basicly but for windows. I have been using it for years now with no trouble and all of a sudden, all my sites pages that use PHP sessions are now giving errors like this...
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\webserver\htdocs\friendproject2\labs\2.php:1) in C:\webserver\htdocs\friendproject2\labs\2.php on line 3
I realize that this happens from 1 of 2 things generally.
- If there is any whitespace printed to screen before session_start() function is called, that can sometimes cause this to happen
- If there is anything printed to the screen/browser before the session_start() is called.
Now my problem is different. Before tonight, I had hundreds of files that used sessions and none of them showed any of these errors. It is not just 1 file where I am overlooking a user error, this just started affecting all my files. I have not made any changes to my computer tonight or recently that I recall either.
What could be causing this? It is driving me insane and nobody seems to know why this started happening. I think it must be server related
I can even create a file and put it into any folder of my servers web and be a simple file like this bvelow and it will still give the error I show above....
<?PHP session_start(); $_SESSION['test'] = 'test value'; echo $_SESSION['test']; ?>