php_novice2007 Posted August 16, 2007 Share Posted August 16, 2007 Hi, I'm following the tutorial on this page: http://www.phpfreaks.com/tutorials/128/2.php and I've created 2 files, one called phpFreaksCrypto.class.php5 and the other one called encryptDecrypt.php in which I've just copied and pasted the code from the tutorial straight across. When I try to run it I get the following: Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use extension=php_mcrypt.dll in your php.ini in C:\_cathy\websites\phpFreaksCrypto.class.php5 on line 29 The Mcrypt module could not be loaded. Fatal error: Call to undefined function mcrypt_generic_deinit() in C:\_cathy\websites\phpFreaksCrypto.class.php5 on line 82 Am I supposed to change something in the php.ini file? I've tried uncommenting the line extension=php_mcrypt.dll but nothing happened... Thanks for any help! Quote Link to comment https://forums.phpfreaks.com/topic/65229-mcrypt/ Share on other sites More sharing options...
ToonMariner Posted August 16, 2007 Share Posted August 16, 2007 have you restarted your server? Quote Link to comment https://forums.phpfreaks.com/topic/65229-mcrypt/#findComment-325719 Share on other sites More sharing options...
php_novice2007 Posted August 16, 2007 Author Share Posted August 16, 2007 Yes I have restarted the server, same thing happened. Quote Link to comment https://forums.phpfreaks.com/topic/65229-mcrypt/#findComment-326236 Share on other sites More sharing options...
php_novice2007 Posted August 16, 2007 Author Share Posted August 16, 2007 Actually I got it working now, I needed to copy libmcrypt.dll into my systems folder.. forgot about needing to do that OOPS~! Anyway I got another questions.. I'm gonna encrypt a password, and store it into my database. When a user tries to login, I'll take out the password from the database and decrypt it to check against what the user type. First of all is this actually protecting the password?.. Even if someone can access the database they will only see the encrypted password they can't work out what the actual password is right? Secondly.. I have to store the encrypted password in the database, and I'm wondering what kind of variable should I make the password column. Can I stick to varchar and make it say 50 characters long or should I set it as text? Is the length of the encrypted word a function of the length of the original word? Thanks~! Quote Link to comment https://forums.phpfreaks.com/topic/65229-mcrypt/#findComment-326250 Share on other sites More sharing options...
dbo Posted August 16, 2007 Share Posted August 16, 2007 While this approach is certainly better than storing it as clear text it's best to encrypt things such as passwords with something such as md5 which is not reversible. Then you just compare encrypted to encrypted. Quote Link to comment https://forums.phpfreaks.com/topic/65229-mcrypt/#findComment-326253 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.