Creating DLL files for PHP4
| From: | Paulson, Joseph V. \"Jay\" | Date: | Thu, 16 Nov 2000 16:26:47 +0000 |
| Subject: | Creating DLL files for PHP4 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25717@lists.php.net to get a copy of this message | ||
>libmcrypt.dll does in fact contain the mcrypt functions, but PHP can't
>call these functions directly. Instead you need to use the php_mcrypt.dll
>wrapper library, unless the wrapper functions are compiled directly into
>the PHP module or executable.
Does this indicate to you that I need to include the libmcrypt.dll as an
extension or use dl("libmcrypt.dll");? When I try this I still get a warning
stating that this may not be a php library, even when I have the
php_mcrypt.dll loaded as an extension. I also have tried php_mcrypt.dll from
www.php4win.de but I get the following warnings when I try to use the
functions:
Warning: could not open encryption module in
c:\web_development\dmccandless\example.php on line 25
Warning: Supplied argument is not a valid MCrypt resource in
c:\web_development\dmccandless\example.php on line 26
Warning: can not create an IV with size 0 or smaller in
c:\web_development\dmccandless\example.php on line 26
Warning: Supplied argument is not a valid MCrypt resource in
c:\web_development\dmccandless\example.php on line 27
Warning: Supplied argument is not a valid MCrypt resource in
c:\web_development\dmccandless\example.php on line 28
Warning: Supplied argument is not a valid MCrypt resource in
c:\web_development\dmccandless\example.php on line 29
code snippet (lines 25-29):
$td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_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_end ($td);
Also, when I use phpinfo(); the mcrypt module states that there are no
supported ciphers and no supported modes. I think I must be doing something
incorrectly with the setup because there is a keys directory that contains
files for the various cipher algorithms, such as tripledes.a.