Re: Confusing Session terminology
| From: | Justin French | Date: | Tue, 06 May 2003 00:01:57 +0000 |
| Subject: | Re: Confusing Session terminology | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146479@lists.php.net to get a copy of this message | ||
Not exactly *solving* your problem, but why can't you just session_start()
at the top of the script, on every page, regardless?
This is what I do with my main code base, and can only think of a few
isolated instances where this wouldn't be desirable.
Also, you should be able to do lots of include()'s of classes, libraries,
code etc etc (providing they don't have any blank lines or other output in
them) before the session_start()... eg:
<?
include('something.class');
include('foo.lib');
include('otherstuff.php');
if(something)
{
session_start();
}
?>
Justin
on 06/05/03 5:30 AM, Brenton Bartel (brentonb@uvic.ca) wrote:
> 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??