On Friday 13 August 2004 11:14 am, Andre Dubuc wrote:
> Hi James,
>
> Well for what it's worth:
>
> Your code in Test1 sets the paraemters -
> if(!$_SESSION['start_time']){
> echo("\n Session Reset<BR>");
> $_SESSION['start_time'] = time();
>
> yet when Test2 loads, you haven't called $_SESSION[''start_time'} nor, for
> that matter, have you 'saved' it using session_write_close();
From the Manual:
Session data is usually stored after your script terminated without the need
to call session_write_close(),
> Therefore when the Test2 loads, time is not set, so when it returns to
Time is set.
> Test1 and hits the above condition, it will write a new time, and hence a
> new session.
>
It should never hit the if condition after the first load of the page.
> I presume two things; 1. that you have <?php session_start(); ?> as opener
> lines on each page and 2. that register_globals=off.
In my php.ini I have session.auto_start = 1, so that I do not need
session_start(). And register_globals is set to off.
> The last thing caused
> all sorts of grief for me last week - messes up sessions if 'on'
>
Been there done that! Thanks for trying to help!
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php