English 中文(简体)
编码会议经常结束
原标题:codeigniter session expires frequently

I m 采用密码调子,供我用

尽管用户在现场积极工作,但我的问题是会议结束。

These are the session settings.. i m using DB session

$config[ sess_cookie_name ]     =  ci_session ;
$config[ sess_expiration ]      = 7200;
$config[ sess_encrypt_cookie ]  = FALSE;
$config[ sess_use_database ]    = TRUE;
$config[ sess_table_name ]      =  edu_sessions ;
$config[ sess_match_ip ]        = FALSE;
$config[ sess_match_useragent ] = TRUE;
$config[ sess_time_to_update ]  = 300;

any solution for this.

help me i have to fix it

http://codeigniter.com/forums/viewthread/182755/“rel=“nofollow”

问题回答

我先与 CI开会讨论问题,会议随机结束。 您有非洲宇宙航空研究开发机构,还是有活力的资源,把会议图书馆装上? 如果是的话,设想这一设想:

我提交了一项亚克斯请求(通过我在 CI会议上与 co合),并回复了结果,BUT I m还提交了在第一次请求之后立即提出的其他一些请求(载上动态形象、美国宇宙航空研究开发机构的另一项请求等)。 第一项请求可能会引发300次“更新时间”活动,并背弃新的厨师,但另一项请求是将旧会议视为正当?

因此,《国际公认准则》说,“你,你可以这样做”,并创立了新的会议,使我的浏览器现在都不知道什么。

Here s a forum link I posted a while back that goes into more detail: http://codeigniter.com/forums/viewthread/172415/

如第一份答复所述,图书馆有一个种族条件,但最近版本的《识别法》,包括发展部门,已经在一定程度上缓解了这种状况。 这是对届会轮换进行“Ajax”检查,但并没有真正解决根本问题。

are you sure that the session is destroyed? I think that it s just not getting updated as supposed and it creates a new one on every page request. (common Codeigniter s setting issue)

www.un.org/Depts/DGACM/index_spanish.htm

double check your Application/Config/config.php file to ensure that the part of session domain looks like that if you host the site on the main directory:

$config[ cookie_prefix ]    = "";
$config[ cookie_domain ]    = "yourdomain.com";
$config[ cookie_path ]  = "var/sessions/";
$config[ cookie_secure ]    = FALSE;

如果你把该网站放在一个子标题上,就如:

$config[ cookie_prefix ]    = "";
$config[ cookie_domain ]    = "yourdomain.com";
$config[ cookie_path ]  = "siteSubDirectory/var/sessions/";
$config[ cookie_secure ]    = FALSE;

and also make sure that the 2 directories are writable by fixing their permissions to 755 or so, and I strongly recommend that you enable database session, it s more secure and will help you find out the real problem by checking the session table. good luck :)

I will add a workaround for this issue. if an ajax call is made then do not update the session extend the session class by adding this file to the libraries folder:

    class MY_Session extends CI_Session {

    // --------------------------------------------------------------------

    /**
     * sess_update()
     *
     * @access    public
     * @return    void
     */
    public function sess_update()
    {
        $CI =& get_instance();

        if ( ! $CI->input->is_ajax_request())
        {
            parent::sess_update();
        }
    }

}

Just change ci_sessions table encode to MyISAM: ALTER TABLEci_sessionsENGINE = MyISAM;

Remove bellow line from config.php

$config[ cookie_path ]      =  / ;

You may need to set the cookie domain in ,/application/config/config.php

  PHP Code:
    $config[ cookie_prefix ]   =   ;
    $config[ cookie_domain ]   =  .domainname.com ;
    $config[ cookie_path ]     =  / ;
    $config[ cookie_secure ]   = FALSE;
    $config[ cookie_httponly ] = FALSE;

cookie_domain as your host name, this resolve my session expire issue





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签