Results 1 to 3 of 3

Thread: Php session expire

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Php session expire

    Ok i've just set up a control pannel for a client of mine so they can edit add delete news posts and events,

    Now the sesions all work fine but they time out after a few minutes, is there any way i can increase the time out of the sessions? I've been looking at the manual

    http://us4.php.net/manual/en/ref.session.php

    session.cache_expire "180" PHP_INI_ALL

    And i think thats the setting i need o chnage but i have no idea how to do it? Could anyone assist me on this?

    Thanks

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Php session expire

    Use ini_set() http://us4.php.net/manual/en/function.ini-set.php

    ini_set("session.cache_expire",180);

    That should work as far as i know but i haven't tried it yet.

    [EDIT]

    you can also use ini_get to check what values have been set if you don't have access to the php.ini files

    http://us4.php.net/manual/en/function.ini-get.php

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Php session expire

    All the PHP modules which have ini dierectves associated with them will be displayed inthe following way in the PHP documentation, which will give you information on when and where they can be set. Some directives can be set only in the php.ini file, PHP_INI_SYSTEM and some can be set anywhere, PHP_INI_ALL.

    directive.name "default" PHP_INI_*

    For settings which are PHP_INI_ALL or PHP_INI_USER, you can use the ini_set() function, tochnage the values of in your script. These changes are however volatile and the settings will go back to their original as per defualt or php.ini file the next time the script is called.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width