Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

can't login.... #22

Closed
vijaykoogu opened this issue Feb 8, 2011 · 17 comments
Closed

can't login.... #22

vijaykoogu opened this issue Feb 8, 2011 · 17 comments

Comments

@vijaykoogu
Copy link

i have installed framework on my system but when i try to login in it username n password (sysPassword) it doesnt login in......plz help me..... im new to this framework want to learn more on this framework....

@AliasIO
Copy link
Owner

AliasIO commented Feb 8, 2011

Hi, I'm here to help. :)

Did you download the 1.3b1 package or the latest source? I've just tested the beta and it works for me, the latest source code may have some bugs in it though.

https://github.com/ElbertF/Swiftlet/downloads

Does the login page say your password is incorrect or does it show an error message? Have you changed sysPassword after installing the plugins?

@vijaykoogu
Copy link
Author

nop i have download from the main site. i dint change anything....it happen while logging in..... and i wanted to be part of this framework with u.... do you have any manuals so i can get through.....

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

The download button on the main site links to the download page on Github. To be sure you have to right version please download this file and try it again:

https://github.com/ElbertF/Swiftlet/zipball/1.3b1

Thanks for giving Swiftlet a try, you may find a few bugs here and there but with your help we can make it a solid piece of software. :)

@vijaykoogu
Copy link
Author

yep i have downloaded the same link... as i was checking i found that my pass_hash in the user table is blank ..... but wen i saw this '$passHash = $this->make_pass_hash('Admin', $this->app->config['sysPassword']);' in User.php file....i think its not saving the pass into database.....

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

Strange, it works for me. Perhaps your PHP installation has no blowfish support, which is used to generate the hash.

Try saving this hash in the pass_hash field manually:

$2a$13$ec49e12cc2b7469919066uTuJSEIlXvXi5Ag5yFW4nKh247uZ7iyC

This is the hash for username "Admin" and password "123". Hopefully with this you'll be able to log in.

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

If that doesn't work, try this:

In /_app/plugins/User.php, find the make_pass_hash() function and add an error message:

if ( CRYPT_BLOWFISH == 1 )
{
    ...
}
else
{
    $this->app->error(FALSE, 'No blowfish support');
}

Try loggin in again. If you get the "no blowfish support" error at least we know what the problem is and I can find a solution for it.

@vijaykoogu
Copy link
Author

My user is Admin and pass admin

@vijaykoogu
Copy link
Author

what i have is tat i took make_pass_hash($username, $password) n executed ie:

function make_pass_hash($username, $password)
{
    // if ( CRYPT_BLOWFISH == 1 )
    // {
        $salt     = '$2a$13$' . substr(hash('sha256', uniqid(mt_rand(), TRUE) . 'swiftlet' . strtolower($username)), 0, 22);
        $passHash = $salt . $password;

        $passHash = crypt($password, $salt);

        echo $passHash;
    // }
}

 make_pass_hash("Admin", "admin");
     n i got  $23PstrXfk7Nw 

i saved it into my pass_hash field. n now wen i try to login nothing comes.... i mean to say wen i type user name n pass it reset the login form n the URL becomes 'http://localhost/Swiftlet1/?q=login&notice=login'

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

I've just been testing it on Windows XP and have the same issue (I normally use Linux). It looks like it's not saving the session cookie (sw_session) for some reason. Are you on Windows?

@vijaykoogu
Copy link
Author

yep im wokring on windows XP...

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

Alright at least I know where to look. When I get home later today I'll do some more testing and hopefully come up with something that works. Thanks for baring with me, I'll keep you updated. :)

@vijaykoogu
Copy link
Author

thanks bro....well no problem.... plz let me know if u need any help from my side...

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

I tested it on Windows Vista on XAMPP and it works... Then I tested it on Windows XP on WAMP and the login is broken. I won't be able to fix this today but I'll have another look tomorrow. What server package do you use?

@vijaykoogu
Copy link
Author

i use wamp5 server....

@AliasIO
Copy link
Owner

AliasIO commented Feb 9, 2011

I think I finally got it.

In /_app/plugins/Session.php in the end() function, look for setcookie() (line 245) and change $host to FALSE. Let me know if that fixes it for you. :)

@vijaykoogu
Copy link
Author

Yep its working for me now.. i got the welcome message ... but still i was getting login form.. but wen i clicked on Menu (Dashboard) then its gone......

@AliasIO
Copy link
Owner

AliasIO commented Feb 10, 2011

Ok great, thanks for your help. :)

Unless you were redirected to the login page you should stay on the login page after logging in. This may be a little confusing but I haven't really found a good solution for it.

Closing this ticket as the issue is resolved, feel free to leave a comment if you have anything to add.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants