I have a peculiar problem after having changed host: what was working on the other side now just says the following:
**Cannot modify header information - headers already sent by (output started at ect/etc/blah/database_config_file.php:1).
I have no idea of how could I be sending the headers in the database config file, and even checked it. There's nothing wrong with it (no spaces, no echo function). Any clues on how to fix this? It's a nightmare...
EDIT: I've read "headers already sent" but unfortunately it isn't helping me, together with many other discussions about this issue. Thanks for pointing that out.
The thing I am trying to use is Abraham William's callback.php in Twitteroauth (works!). The database config is what gives the error (reportedly) and I can report it here if you want...There are no spaces. Besides, the same config file works fine if included in another PHP file. The issue is given, as far as I can see, by starting the session, checking if the given session is what you want, and then redirecting with header("location: somepage.php");
, which, to me at least, is the normal authentication procedure.
If you echo JavaScript instead of redirecting with PHP, it gives no error but there's no session stored either. I'm calling this a bug, because it's impossible to work this way.