Hello

I checked the PHP manual and couldn't find anything on this...

When I call session_register() an implicit call to session_start() is 
executed. So if the session handling uses cookies to track the session and 
the call to session_register() is not before any output this will cause a 
header allready sent problem. Is this correct? 

If so how can I call a register session from within a class and make sure 
that the session is allready active and if not just print a warning. 

For background information: The class mentioned above is part of a 
classlib used by others and I can not guarantee that they call 
session_start since I have no controll over how my class lib gets 
included. 
So the issue here is if it is possible to create a backup for this problem 
or if I just have to rely on the user of the classlib to understand the 
mechanisms of session tracking. 
Any ideas on this? What do you consider best practice in this matter?

Thanks for all the advice I have received so far

Stefan

Reply via email to