Jump to content

error login admin


Guest JHN

Recommended Posts

When I enter url http://localhost/upload/admin/ , it was successful. But with many errors like on the header :

Warning: open(f:\tmp\sess_94d95f080bb8372aa2a7ac4cfa4e1e43, O_RDWR) failed: No such file or directory (2) in c:\home\localhost\public_html\upload\admin\login.php on line 30

And on the bottom :

Warning: open(f:\tmp\sess_94d95f080bb8372aa2a7ac4cfa4e1e43, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (f:\tmp) in Unknown on line 0

And also No administration session was found. And theres username and password. When I enter username : root , with blank password. This comes out :

Warning: open(f:\tmp\sess_94d95f080bb8372aa2a7ac4cfa4e1e43, O_RDWR) failed: No such file or directory (2) in c:\home\localhost\public_html\upload\admin\login.php on line 30

MySQL Error Occured

1146: Table 'store.cubecart_admin_users' doesn't exist

QUERY = SELECT adminId FROM CubeCart_admin_users WHERE username = 'root' AND password = 'd41d8cd98f00b204e9800998ecf8427e'

Warning: open(f:\tmp\sess_94d95f080bb8372aa2a7ac4cfa4e1e43, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (f:\tmp) in Unknown on line 0

how to fix? please help.

Link to comment
Share on other sites

  • 2 weeks later...

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...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 :P

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

Link to comment
Share on other sites

Guest majorsky

Yes it did...completely functional...however look at a post that I put somehwere as a reply to my own post...so you can take the die sentence out....

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

PS: you see? take the die out and just put the exit lines where ti says...problem solved.

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...