php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24052 Fatal error: Call to undefined function: mcrypt_generic_deinit()
Submitted: 2003-06-05 21:58 UTC Modified: 2004-01-18 17:39 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: wkongucd at yahoo dot com Assigned: edink (profile)
Status: Closed Package: mcrypt related
PHP Version: 4.3.4 OS: Windows 2000
Private report: No CVE-ID: None
 [2003-06-05 21:58 UTC] wkongucd at yahoo dot com
I used the following code:
<?php
    $key = "this is a secret key";
    $input = "Let us meet at 9 o'clock at the secret place.";

    $td = mcrypt_module_open ('tripledes', '', 'ecb', '');
    $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND);
    mcrypt_generic_init ($td, $key, $iv);
    $encrypted_data = mcrypt_generic ($td, $input);
    mcrypt_generic_deinit ($td);
    mcrypt_module_close ($td);
?>

In my php.ini file:
extension=php_mcrypt.dll

I use IIS 5.0 server and use SAPI filters.

The error message I get is:


Fatal error: Call to undefined function: mcrypt_generic_deinit()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-06 01:09 UTC] sniper@php.net
Edin, another missing -D for win32 build?
HAVE_MCRYPT_GENERIC_DEINIT
(or it should be 'ifdef' in mcrypt.c ??

 [2003-06-14 13:33 UTC] edink@php.net
Are you sure you have used php_mcrypt.dll from php 4.3.2 distribution?
 [2003-06-17 00:12 UTC] wkongucd at yahoo dot com
Yes, I used the php_mcrypt.dll file that was distributed from PHP 4.3.2.
I also used the libmcrypt.dll file the I downloaded from http://ftp.proventum.net/pub/php/win32/misc/mcrypt/

I still get the fatal error message for only mcrypt_generic_deinit()
 [2003-06-17 05:43 UTC] sniper@php.net
Make sure you really updated EVERYTHING.


 [2003-06-17 17:27 UTC] wkongucd at yahoo dot com
Everthing is updated!
I used everything distributed from PHP 4.3.2
The only file I didn't use from PHP 4.3.2 was the libmcrypt.dll file.  That file is necessary for the mcrypt package to work.
 [2003-06-17 17:32 UTC] edink@php.net
OK. I'll have another look.
 [2003-06-17 17:43 UTC] edink@php.net
Just tested it again and te example works fine. The problem was fixed on 2003/03/03 which is way before php-4.3.2 was released. I suggest you re-check your installation and extension_dir specifically.
 [2003-07-30 07:30 UTC] jwm47 at student dot canterbury dot ac dot nz
I have the same issue...   and corrected it by updating all drivers.
 [2003-12-19 06:12 UTC] nunoplopes at sapo dot pt
I'm using php 4.3.5-dev with the extension from http://ftp.emini.dk/pub/php/win32/mcrypt/ as sugested by the manual.
I receive the error "Call to undefined function: mcrypt_generic_deinit()".
 [2003-12-30 20:05 UTC] sniper@php.net
Was already fixed. (in the SNAPSHOTS..)

 [2004-01-18 14:28 UTC] derick@php.net
Still seems to fail as a user on IRC reported that he still gets this error; not sure why though as the define seems to be set just fine. (Perhaps it needs to be set to /D HAVE_MCRYPT_GENERIC_DEINIT=1 as the code uses  #if and not #ifdef).
 [2004-01-18 14:33 UTC] ronan at ronanmcnulty dot co dot uk
I have the exact same error with the example 2 from :
http://www.php.net/manual/en/function.mcrypt-module-open.php
 [2004-01-18 17:39 UTC] edink@php.net
Ok. The instructions on my site were a bit outdated. Your are supposed to use php_mcrypt.dll from the php distribution 4.3.2 or newer and only libmcrypt.dll from the file dowloaded from http://ftp.emini.dk/pub/php/win32/mcrypt/

I have now removed php_mcrypt.dll from there so people in he future don't make similar mistake.
 [2004-04-21 00:52 UTC] andy at vividflow dot com
It seems that the general concensus is that this issue is closed, however, I'm running PHP 4.3.4 on a win 2k machine & apache 1.3x, also downloaded latest libmcrypt.dll, and I consistently get

Fatal error: Call to undefined function: mcrypt_generic_deinit() in ...

everything else related to mycrypt works
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 17:01:32 2024 UTC