The directive session.cookie_lifetime in your php.ini is what a session
cookie timeout defaults to.  You can manually set the lifetime when you
create it using session_set_cookie_params().

http://us3.php.net/manual/en/function.session-set-cookie-params.php

--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org


"Terry Romine" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a site that is using $_SESSION['variablename'] for many
> variables that are loaded when the user first enters the site
> (index.php), and then referenced on each page (display.php):
>
> ex: index.php
> session_start();
> $agencyID=9;
> $agencyName="fremont";
> $_SESSION['agencyID'] = $agencyID;
> $_SESSION['agencyName'] = $agencyName;
>
> ex: display.php
> session_start();
> $agencyID=$_SESSION['agencyID'];
> $agencyName=$_SESSION['agencyName'];
>
> But after awhile, the session seems to fail and I end up back at the
> index page because the $agencyID gets voided. Is there a timeout on
> sessions other than closing the browser? If so, is there a way to set
> timeout if one doesn't have server admin access? Should I be doing
> something like:
>
> ex: display.php
> session_start();
> $agencyID=$_SESSION['agencyID'];
> $agencyName=$_SESSION['agencyName'];
> $_SESSION['agencyID'] = $agencyID;
> $_SESSION['agencyName'] = $agencyName;
>
> to update the session variables with each page?
>
> Terry

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to