![]() |
|
#1
|
|||
|
|||
Need help with Mcrypt installationHey ya'll,
I'm new on GIDForums. Figured this would be a good place to start when looking for people of relevant skills to answer my questions... Today, I've discovered that my life would be a lot easier if I used the php_mcrypt extension, rather than my own code. So I've been trying to install it, and I think I've got everything working (after 2 hours of searching for the right dll files)... except one minor detail... Notice: Use of undefined constant MCRYPT_TWOFISH256 - assumed 'MCRYPT_TWOFISH256' in D:\Web\enc\encryption\encryption.inc on line 19I've got php_mcrypt.dll in my c:\php\ folder (with all my other extensions), it's activated in php.ini (uncommented), and I've got libmcrypt.dll in my c:\windows\system32\ folder. It just can't seem to find the modules for the encryption algorithms. I'm not sure where to put them, how to register them, or whatever I need to do. All help would be much appreciated! Thanks! |
|
#2
|
|||
|
|||
|
Note: Please ignore the line "Encrypted: " ... it's from the content that follows.
The call that's causing this error: $cipher = mcrypt_encrypt(MCRYPT_TWOFISH256,md5($private_key) ,$data,MCRYPT_MODE_CBC); From various alterations to the code, and still getting the same result, I gather that the library isn't loading right. |
|
#3
|
|||
|
|||
Major Code RevisionI've changed the code again...
Here's the code: PHP Code:
Warning: mcrypt_module_open(): Could not open encryption module in /home/httpd/vhosts/dev.cabinriver.net/subdomains/mts/httpdocs/sam/encrypt/encryption.inc on line 20 I think it has to do with my mcrypt_module_open(<algorithm>,<path to algorithm>...) call... I don't know where the algorithms are stored. Any tips? (And yes, ya'll can sarcastically tell me that I need to put a path in there instead of '') Thanks Last edited by JdS : 28-Nov-2004 at 03:20.
Reason: Code formatting
|
|
#4
|
|||
|
|||
Next Issue...OK, so I'm not getting that error anymore. I've made significant changes to my code. But now I'm getting other weird behavior... it seems that when I use mcrypt_generic() with the appropriate data, I get a perfectly good looking cipher text, but I can't seem to decrypt it (using mdecrypt_generic()). Not sure what the problem is, but from looking around, I may not be the first person to see this one. If someone would be willing to look at my code in depth, it would be much appreciated, but the quantity of code that I've got isn't practical to post here.
Please let me know if you're willing to do so. Thanks! (email: optik@myrealbox.com) Last edited by JdS : 28-Nov-2004 at 03:21.
Reason: please do NOT feed the spambots with email addresses in your posts
|
|
#5
|
||||
|
||||
|
Hello optik_knight,
I had some success using the mcrypt functions in some of my scripts. That doesn't mean I know enough to troubleshoot your problem. I however, do recall not being able to use every mcrypt cipher as listed in the php manual. I am just guessing that this is win32 specific issue, where only some of these ciphers work and the rest remain unsupported. Could that be it? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#6
|
|||
|
|||
|
Quote:
Yeah, sounds reasonable. I've tried several and haven't had any luck on my win32 system. I ran the scripts on a *nix development server and it worked... once... and then it didn't work again after that. So I'm not really sure what the problem is. I'm rather confused. Any chance that recent distributions of the mcrypt libraries are bugged/unreliable? |
|
#7
|
||||
|
||||
|
My experience with the mcrypt functions are that only a few of these ciphers never worked for me in my scripts, the rest however did work beautifully.
I use it to create encrypted urls (off the list of hosts) in the "GIDWebHosts" site in my signature. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#8
|
|||
|
|||
|
Interesting. I'll be using them to encrypt files to be stored in a MySQL database for a secure online storage site. ... but not until I get this working, of course. In the mean time, I've found a way to manipulate the data in a way that it's decryptable, just not using the normal encryption functions. The result, unfortunately it's roughtly 3x the size of the original file... too much bloat for me, so I'm trying to use the mcrypt library as an alternative.
Do you happen to know anyone who's particularly experienced with mcrypt and its various applications? |
|
#9
|
||||
|
||||
|
Maybe if you can post just the portions of your code where you are using the mcrypt functions, I can quickly take a look at it for you.
Please do not post your entire script here... ![]() __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
The bogus security of airport screening by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Installation | Jags | Computer Software Forum - Linux | 1 | 26-May-2004 16:37 |
| Apache installation problems | kenmbobua | Apache Web Server Forum | 1 | 12-May-2004 11:31 |
| Apache 2 Installation Issues | yudansha nic | Apache Web Server Forum | 3 | 26-Feb-2004 03:52 |
| qmail installation problem | dharm_shankar | Computer Software Forum - Linux | 3 | 06-Feb-2004 04:15 |
| problem with php5 cgi installation | fab13 | Apache Web Server Forum | 3 | 19-Nov-2003 09:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The