PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
[03-Aug-2005 14:05:11] PHP Warning: session_module_name(): A session is active. You cannot change the session module's ini settings at this time. in /xxx/sessions.php on line 5
Eventhough a sessionid exists I would still need to overwrite the settings right ? Otherwise it'll write sessions to the default one files ! Im writing sessions to a MySQL db.
There is a possibility of existing sessionids as a results of not logging off etc.
Anyway, I did all the possible checks and if not valid
header("Location: login.php")
It seems code after header Location is still getting executed.
I just learnt that thats possible - placed an exit after all header Location - now it seems to be ok.
if (isset($_POST['Username']))
{
Session_Load(); // User defined function that has the 3 lines in the 1st post.
// etc
header("Location:MyPage.php");exit;
}
else
{
// Something else
}
Could this be the reason for the error ? There are another 2 which with the 1st one as well - they come in a block. A session had already been started and Cannot modify header information .
Is it because Session_Load is getting called twice ?
All this time I thought header Location is just like a Javascript redirect or a META REFRESH.
In this case does index.php and MyPage.php get executed in a single thread ?