PHP Scripts Development » PHP Classes Support Forum » Access_user Class Support forum

How to disable expire login limit?

(10 posts)

Tags:

Great offers not only for geeks!


  1. Hai, olaf
    i have something to ask, :)
    how to disable/increase time/expire login limit?
    it seems the session/cookie expire and user must login again?
    i already cek automatic login but always redirect
    to deny access page after few hours.

    Thanks olaf.

    Posted 6 months ago #
  2. Hi Andree,

    this is not related to the cookie but to the session, you can raise this value with:

    ini_set("session.gc_maxlifetime", "7200"); // value in seconds

    just place this code in your class file above the session_start() function.

    Posted 6 months ago #
  3. Hello, olaf
    long time not talk..
    sori to make u wait :)

    btw,

    ini_set("session.gc_maxlifetime", "7200"); // value in seconds

    it's not work, any other suggest?

    i still redirect to login again after few miniutes.

    Posted 4 months ago #
  4. Hi,

    Try this in your .htaccess file:

    php_value session.cookie_lifetime 0
    php_value session.gc_maxlifetime 28800

    The session ends after 8 hour or if the browser is closed

    Posted 4 months ago #
  5. Thanks olaf, but its seems didn't work to..
    my host using linux for OS.
    or maybe there is something i miss..
    i will start to check it again or upgrede to your new ac class.

    Posted 4 months ago #
  6. check your php config with phpinfo() to check if your new settings are working.

    Posted 4 months ago #
  7. This i got from phpinfo() :

    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_lifetime 0 0
    session.cookie_path / /
    session.gc_divisor 100 100
    session.gc_maxlifetime 28800 1440
    session.gc_probability 1 1
    session.save_path no value no value

    is this correct? :)

    Posted 4 months ago #
  8. I have these settings:

    session.auto_start Off Off
    session.bug_compat_42 On On
    session.bug_compat_warn On On
    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_domain no value no value
    session.cookie_httponly Off Off
    session.cookie_lifetime 0 0
    session.cookie_path / /
    session.cookie_secure Off Off
    session.entropy_file no value no value
    session.entropy_length 0 0
    session.gc_divisor 100 100
    session.gc_maxlifetime 1440 1440
    session.gc_probability 1 1
    session.hash_bits_per_character 4 4
    session.hash_function 0 0
    session.name PHPSESSID PHPSESSID
    session.referer_check no value no value
    session.save_handler files files
    session.save_path no value no value
    session.serialize_handler php php
    session.use_cookies On On
    session.use_only_cookies Off Off
    session.use_trans_sid 0 0

    Posted 4 months ago #
  9. I have the same phpinfo() now:

    session.auto_start Off Off
    session.bug_compat_42 On On
    session.bug_compat_warn On On
    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_domain no value no value
    session.cookie_httponly Off Off
    session.cookie_lifetime 0 0
    session.cookie_path / /
    session.cookie_secure Off Off
    session.entropy_file no value no value
    session.entropy_length 0 0
    session.gc_divisor 100 100
    session.gc_maxlifetime 1440 1440
    session.gc_probability 1 1
    session.hash_bits_per_character 4 4
    session.hash_function 0 0
    session.name PHPSESSID PHPSESSID
    session.referer_check no value no value
    session.save_handler files files
    session.save_path no value no value
    session.serialize_handler php php
    session.use_cookies On On
    session.use_only_cookies Off Off
    session.use_trans_sid 0 0

    i upload .htaccess file in http://localhost/classes/access_user/.htacces
    but it didnt work to..

    my admin file in this : http://localhost/account/xxx.php
    and i put this script in xxx.php file:

    include($_SERVER['DOCUMENT_ROOT']."/classes/access_user/access_user_class.php");
    include("../config/cable.inc.php");
    $add_photo = new Access_user;
    $add_photo->access_page();
    if (isset($_POST['Submit'])) {
    $add_photo->update_user($_POST['password'], $_POST['confirm'], $_POST['name'], $_POST['info'], $_POST['email']);
    }
    $error = $add_photo->the_msg;
    if (isset($_GET['action']) && $_GET['action'] == "log_out") {
    $add_photo->log_out(); // the method to log off
    }

    any suggest..?

    thanks.

    Posted 4 months ago #
  10. is this a windows configuration?

    EDIT: you need to upload the .htaccess file into the websites root ;)

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.