jamie Posted January 5, 2011 Report Share Posted January 5, 2011 I am having trouble logging in to the members.php with my code. I thought the password was set up in the config with this line $config['salt'] = 'jk7d?3'; so when I try to login, I keep getting the error. Of course the password field in the database just shows a bunch of characters Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 5, 2011 Report Share Posted January 5, 2011 The password is whatever you set initially when you first set up the database. I believe the first video covers "temp.php" which should look something like this: <?php echo md5('admin' . 'jK7d?3'); ?> The actual password is the beginning portion of the string within md5() - "admin". The salt at the end, "jK7d?3" is just a way to add extra variety/security to the password when it is encrypted using md5(). This makes it more difficult for someone to discover the password in case someone who isn't authorized gets access to the database. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 5, 2011 Report Share Posted January 5, 2011 I re-watched the part of the video where I covered the md5/salt and it seemed relatively clear, but I have added a comment in the downloadable source code in case others need clarification. Quote Link to comment Share on other sites More sharing options...
jamie Posted January 5, 2011 Author Report Share Posted January 5, 2011 I forgot about the temp.php. I copied it exactly so I also have jk7d?3 but when I put that into the password box, I still get the error. I am sure it is not your code. maybe I will just make a new admin and that should fix it. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 5, 2011 Report Share Posted January 5, 2011 I copied it exactly so I also have jk7d?3 but when I put that into the password box, I still get the error. You put "admin" into the password box? According to the way I set things up by default, the username is "admin" and the password is "admin" (obviously you would want to change this to something more secure on a live site.) Quote Link to comment Share on other sites More sharing options...
jamie Posted January 8, 2011 Author Report Share Posted January 8, 2011 You put "admin" into the password box? According to the way I set things up by default, the username is "admin" and the password is "admin" (obviously you would want to change this to something more secure on a live site.) I cannot get logged in to the system. I deleted the admin because it wasn't working and I inserted a new user using phpmyadmin and I still get the error when trying to login. How can I make a new user so that I can view the members.php page Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2011 Report Share Posted January 8, 2011 Can you post (or email to ben [at] killersites.com) your temp.php file, your config file and your login.php file? I want to make sure you are using the correct code to start with. Quote Link to comment Share on other sites More sharing options...
jamie Posted January 8, 2011 Author Report Share Posted January 8, 2011 I will do that right now Quote Link to comment Share on other sites More sharing options...
jamie Posted January 8, 2011 Author Report Share Posted January 8, 2011 sent Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2011 Report Share Posted January 8, 2011 Thanks, got it. One other thing - can you post the username/password of the user you created in the database (within the members table)? PM or email it to me if you'd prefer, though if you are developing on your local computer, there shouldn't be any security issues with sharing that info. I'm not immediately seeing any code issues, so I want to plug it into my setup and test it. Thanks. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2011 Report Share Posted January 8, 2011 I tried testing your code with my own database, and it is working fine for me. Assuming your your password is "admin" and the salt is "jK7d?3", the password that is stored in the database should be "544eec763df08ecb6024f60f39fdc627". Make sure it contains exactly that, and you aren't missing letters at the beginning or end, in case you copied it incorrectly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.