Admin Page Logging Out

Help with configuring and installing razorCMS

Re: Admin Page Logging Out

Postby smiffy6969 » Fri Dec 04, 2009 5:52 pm

err give me an hour or so i'll take a look through what is going on

smiffy
on a long enough time line, everyones survival rate drops to zero... [ed norton - fight club]
http://www.razorcms.co.uk
http://www.mis-limited.com
smiffy6969
Site Admin
 
Posts: 1372
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Admin Page Logging Out

Postby smiffy6969 » Fri Dec 04, 2009 8:31 pm

Ok so does this work then...... if so it might be the multi user access it doesn't like

if this works, maybe we can try doing the multi user bit with a switch instead??

Code: Select all
    //  login  //
    if( !isset( $_SESSION['adminLogIn'] ) ) {
        if( isset($_POST['user']) && $_POST['user'] != '' && isset($_POST['pass']) && $_POST['pass'] != '') {
            if (!checkLog()) {
                if( $_POST['user'] == RAZOR_SADMIN_USER and createHash($_POST['pass'],substr(RAZOR_SADMIN_PASS,0,(strlen(RAZOR_SADMIN_PASS)/2)),'sha1') == RAZOR_SADMIN_PASS ) {
                    $_SESSION['loginTimeStamp'] = $ts = time();
                    $_SESSION['adminLogIn'] = sha1($_SERVER['REMOTE_ADDR'].RAZOR_SADMIN_USER.$ts.$_SERVER['HTTP_USER_AGENT']);
          $_SESSION['adminType'] = 'sadmin';
                } else {
                    loginLog();
                }
            } else {
                MsgBox(lt('You have exceeded the max amount of login attempts in').' '.(RAZOR_LOGAT_TIME/60).' '.lt('minutes'), 'redbox');
            }
        }
    } else {
        if($_SESSION['adminLogIn'] == sha1($_SERVER['REMOTE_ADDR'].RAZOR_SADMIN_USER.$_SESSION['loginTimeStamp'].$_SERVER['HTTP_USER_AGENT'])) {
            $_SESSION['loginTimeStamp'] = $ts = time();
            $_SESSION['adminLogIn'] = sha1($_SERVER['REMOTE_ADDR'].RAZOR_SADMIN_USER.$ts.$_SERVER['HTTP_USER_AGENT']);
            $_SESSION['adminType'] = 'sadmin';
        } else {
            @session_destroy();
            unset( $_SESSION['adminLogIn'] );
        }
    }
    // end //////
on a long enough time line, everyones survival rate drops to zero... [ed norton - fight club]
http://www.razorcms.co.uk
http://www.mis-limited.com
smiffy6969
Site Admin
 
Posts: 1372
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Admin Page Logging Out

Postby Thirtysixway » Fri Dec 04, 2009 11:44 pm

okay it's not working anymore, it must be my browser..

I was at school on firefox/windows when it worked. It doesn't like ubuntu :)

Doing some testing, I've found that the cookie/session isn't liking the domain name I'm using. I have a cname pointing to a no-ip.com address that points to my home dev server. When accessing the site from my LAN, I believe it's generating my IP to be 192.168.1.1 but if I access my server via its lan ip, 192.168.1.10, the admin panel doesn't kick me out.
Thirtysixway
 
Posts: 6
Joined: Wed Dec 02, 2009 10:54 pm

Re: Admin Page Logging Out

Postby smiffy6969 » Sat Dec 05, 2009 4:47 pm

Sounds like the issue to me, it does rely on session data, and from what I can see, it's not holding the session.

let me know how you get on.

smiffy
on a long enough time line, everyones survival rate drops to zero... [ed norton - fight club]
http://www.razorcms.co.uk
http://www.mis-limited.com
smiffy6969
Site Admin
 
Posts: 1372
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Admin Page Logging Out

Postby jimmivader » Thu Mar 18, 2010 11:42 pm

same problem is in powweb hosting.

there is an issue with session folder permitions.
workaround is very simple
make a new folder somewhere outside of htdocs security
and add to index.php of admin
session.save_path = /full_path_to_folder/
jimmivader
 
Posts: 3
Joined: Thu Mar 18, 2010 11:27 pm

Re: Admin Page Logging Out

Postby The Silent Man » Wed Jul 28, 2010 4:09 pm

I've been having this problem on and off since Saturday night and it was driving me crazy!!! The only thing that I had changed since first using razorCMS (I STILL LOVE IT) was to add SMF forum and then add selected MODS one at a time. It turned out to be down to file permissions on some of the MODS and once I ftp'ed in to my website and changed the permissions to 644 I was able to use the Admin area again. Something worth keeping in mind if you are having the same problem in the future.

EDIT:

Okay, I spoke to soon :( Although the above worked I'm having the problem again :? This time I fixed it by deleting all cookies from my site, deleting all references to my site from the cache, flushing the DNS and then finally restarting Firefox. Tried each action on there own but still had the problem, did all 4 together and all's working well (for now). I wonder if SMF is the cause of the problem?

TSM.
Without walls and fences there's no need for Windows or Gates!!!
The Silent Man
 
Posts: 4
Joined: Mon May 10, 2010 2:57 pm
Location: Bootle, Merseyside.

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron