RE: [PHP] Confusing Session terminology
| From: | Brenton Bartel | Date: | Mon, 05 May 2003 18:30:32 +0000 |
| Subject: | RE: [PHP] Confusing Session terminology | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146441@lists.php.net to get a copy of this message | ||
Yes, session.use_cookies is set to 0 in my php.ini file. I even checked to
make sure using ini_set ().
Background:
I have a hierarhical type structure to my site, to ensure consistency and
security, so everything goes through a single file and then various other
files are included as needed. I would prefer that session_start () be run at a
point later on in the script so that I have type to figure out what classes to
include, as these need to be included prior to starting the session. As it
stands, if session_start () is sending cookies no matter what, that means I
need extra conditions to include the classes, which would require them to be
in a completely different place then where they are being used, thus breaking
up my code, which just gets confusing ... follow??
>===== Original Message From Marek Kilimajer <kilimajer@webglobe.sk> =====
>Did you set session.use_cookies to 0? Even if you don't rely on session
>cookie, it is sent if this option is on.
>
>Brenton Bartel wrote:
>
>>Hullo all,
>>K, I'm totaly frustrated on this one ... the documentation for session_start
>>states:
>>"Note: If you are using cookie-based sessions, you must call
session_start()
>>before anything is output to the browser."
>>
>>So does this mean that if I have turned off cookie-based sessions I can call
>>session_start anywhere I want? Even if output is already sent?? In my
>>experience no .. I am not using cookie-based session, yet I still get the
>>typical error message of output before headers .. which I would normally
>>expect since i do have output prior.
>>As a result, shouldn't the documentation then state that I must call
>>session_start before any output is sent? irregardless to cookie-based or
>>not??? cause it points to that fact!!
>>
>>
>>
>>
>>