Jump to content

No administration session was found?


Guest babygender

Recommended Posts

Guest babygender

I've just installed Cube Cart 3 beta and everything installed fine but when I go to login to admin this shows up and I can't login. Is anyone familiar with this?

Link to comment
Share on other sites

Guest majorsky

I had the same issue and I was looking for an answer, and I have seen that many people tried the cookie thing that did not work for me, or htaccess....anyway..

I was debussing the login.php file to try to see where the issue lies...and I am still trying to figure this one out (I am just gaining experience interpreting someone else's code), but I discover at least something to make it work whiel I was debugging. Before I continue with the solution...yes my debug method consists of writing a bunch of "die (here);" sentences <_<

Anyway, go to the admin/login.php and search for this code:

if($result == TRUE) {

$_SESSION['ccAdmin'] = $result[0]['adminId'];

// update no logins

$increment['noLogins'] = "noLogins+1";

$result = $db->update($config['dbprefix']."CubeCart_admin_users", $increment, "adminId=".$result[0]['adminId'],$stripQuotes="");

if(isset($_GET['goto']) && !empty($_GET['goto'])){

header("Location: ".urldecode($_GET['goto']));

} else {

header("Location: ".$GLOBALS['rootRel']."admin/index.php");

}

Now place this right after this code and before the else statement

die ("here");

I know it is not a clean solution but at least I was able to get in the admin area. Once I know what is going exactly, I will return to you!

Hope it helps!

Clauz

Link to comment
Share on other sites

Guest majorsky

It is me again!

Ok, I think I know what's going on....I have noticed in some developments of mine, that for some strange reason, sometimes the sentence "header (Location:....") is ignored and the execution goes on like if that sentence was not there at all...so for those who applied my "die (here)" solution...take that out cos it is not clean and instead insert an "exit;" after the "header (Location:....")

So basically, you get this in the admin/login.php:

if(isset($_GET['goto']) && !empty($_GET['goto'])){

header("Location: ".urldecode($_GET['goto']));

exit; // -->added

} else {

header("Location: ".$GLOBALS['rootRel']."admin/index.php");

exit; //--> added

}

Greetings to you all!

Clauz

Link to comment
Share on other sites

Guest babygender

What's really strange is I installed the same cart on one of my other sites that hosted with a different company and no problem. I'm hosting the site that I can't login the admin area with hypermart. I've tried installing a few times.

Any suggestions? Has anyone heard of this problem with hypermart before?

Link to comment
Share on other sites

Guest babygender

Ok so this problem is kind of solved. I wrote Hypermart about this and they fixed it for me, I asked them what they did so I could let everyone on the forum know and they said they added a session save path and reset the password.

If anyone knows more about scripting please explain how to do this for everyone else.

And if anyone host with hypermart, just email them and they will do it for you.

Link to comment
Share on other sites

  • 3 weeks later...
Guest starlite

Does anyone have a fix for this problem. I just installed it, did the initial setup and can not get into the admin page. Tried all suggestions so far.

Pete

Link to comment
Share on other sites

  • 2 months later...

Hi all,

I had the same problem: ended up with the same error message when repeatedly attempted to login from the same comp. Login alteration from 2 comps in the same network was OK.

Finally, I added the two exits as majorsky recommended and no problem any longer.

Thanks a lot !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...