Session Timeout

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
softstor
Posts: 4
Joined: Fri Dec 28, 2007 11:01 pm

Session Timeout

Post by softstor »

Script URL: http://www.support.monitorlisting.com/
Version of script: 2.0
Hosting company: Hostrazer
URL of phpinfo.php: http://www.monitorlisting.com/phpinfo.php
URL of session_test.php: http://www.monitorlisting.com/session_test.php

Write your message below:

I did a new installation of the script. When I try to login I receive an error that the session has expired. I am unable to login. Here are some details of my hosting account:

PHP: 5.2.8
MySql: 5.0.67 Community

When I try to run phpinfo.php nothing is displayed.

Does anyone have any idea what the problem may be?
softstor
Posts: 4
Joined: Fri Dec 28, 2007 11:01 pm

Post by softstor »

I think the host has Safe Mode turned ON. Would this cause a problem with the script?
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try two things:

1. open the "common.inc.php" file inside "inc" folder in Notepad and change this code:

Code: Select all

function hesk_session_regenerate_id() {

    if (version_compare(phpversion(),'4.3.3','>='))
    {
       session_regenerate_id();
    }
    else
    {
        $randlen = 32;
        $randval = '0123456789abcdefghijklmnopqrstuvwxyz';
        $random = '';
        $randval_len = 35;
        for ($i = 1; $i <= $randlen; $i++)
        {
            $random .= substr($randval, rand(0,$randval_len), 1);
        }

        if (session_id($random))
        {
            setcookie(
                session_name('HESK'),
                $random,
                ini_get('session.cookie_lifetime'),
                '/'
            );
            return true;
        }
        else
        {
            return false;
        }
    }

}
to this:

Code: Select all

function hesk_session_regenerate_id() {
 return true;
}
Close all browser windows then try again and see if it helps.

If not try downloading the hesk_settings.inc.php file from your server, open in Notepad and change

Code: Select all

$hesk_settings['debug_mode']=0;
to

Code: Select all

$hesk_settings['debug_mode']=1;
Again close all browser Windows, try to login and see if you get any new errors or warnings.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
softstor
Posts: 4
Joined: Fri Dec 28, 2007 11:01 pm

Post by softstor »

Thanks changing the function seems to solve the problem. Should I exect any other issues with safe mode turned on?
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Not that I know of and I'm not sure this is a safe mode problem, but for some reason (not known to me) PHP is loosing session data after a regenerated session ID.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
dirko
Posts: 29
Joined: Wed Mar 29, 2006 7:41 pm

did the above changes, but now get other error:

Post by dirko »

Warning: session_start() [function.session-start]: open(/administrator/sessions/sess_e3f3f431ef05b30a493d31e02048e72b, O_RDWR) failed: No such file or directory (2) in /home/trefeu/domains/tref.eu/public_html/help/inc/common.inc.php on line 327


maybe anyone can help on this lovely evening..??

dirko
hungary
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Your PHP has problems creating sessions, contact your hosting company (or check your server settings).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply