Help - Search - Members - Calendar
Full Version: Administration failure
CubeCart Forums > CubeCart Version 3 > Installation & Upgrade Help (Version 3)
Ichrius
I have tried most things I can think of and the admin account I setup with cube is just not working, all the sql data is set right, any suggestions?
Ichrius
Readme txt should have said delete your cookies before admin login will work.Not sure why there was a conflict, but all is great.
gazza
Is there a conflict between CC2 & CC3 cookies?
Al
Could be?!??

I'm trying to remember the CC2 admin cookie name?!?

If they are both called ccAdmin then we have an issue. I'll stick it on my to do list...
Al
Just checked... no there shouldn't be a conflict as the variable name is different...
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...here it goes what I did.

I was debugging 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 while I was debugging. Before I continue with the solution...yes my debug method consists of writing a bunch of "die (here);" sentences tongue.gif

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 DEFINITE 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
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.