Apache/PHP4/libmcrypt installation problem
| From: | Remco Chang | Date: | Tue, 15 Aug 2000 00:13:45 +0000 |
| Subject: | Apache/PHP4/libmcrypt installation problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11709@lists.php.net to get a copy of this message | ||
hi,
i'm wondering if someone has had experience installing libmcrypt-2.2.7
with Apache-1.3.12, Linux RedHat 6.2, and PHP4.0.1pl2...
the problem that i'm having is rather strange, and unfortunately, i have
not been able to find support for this in any book or website or READMEs:
i was successful in the compilation/make/make install process. however,
running the following script:
<?php
$key = "magic key";
$input = "to be encoded";
$en_data = mcrypt_cbc (MCRYPT_TripleDES, $key, $input,
MCRYPT_ENCRYPT);
echo "$en_data<br>";
$de_date = mcrypt_cbc (MCRYPT_TripleDES, $key, $en_data,
MCRYPT_DECRYPT);
echo "$de_data<br>";
?>
results in $en_data being some garbage (definitely not plain text), and
$de_data being NULL. (i also get NULL when calling
$cipher = MCRYPT_TripleDES;
print mcrypt_get_cipher_name($cipher);)
furthermore, i don't seem to be able to call all the mcrypt functios
listed in http://www.php.net/manual/ref.mcrypt.php. for
the majority of
them, i get the something like the following message:
Fatal error: Call to undefined function: mcrypt_get_iv_size() in
/www/htdocs/bq/test.php on line 20
so i got curious and started poking around. i did an:
nm /tmp/apache_1.3.13/src/modules/php4/libphp4.a | grep mcrypt
and got:
<snip>
U mcrypt
U mcrypt_cbc
U mcrypt_cfb
U mcrypt_ecb
00000000 D mcrypt_functions
U mcrypt_get_algorithms_name
U mcrypt_get_block_size
U mcrypt_get_key_size
<snip>
which i took as Undefined Symbols for those functions. given that
libmcrypt should have been linked statically (with configure
--with-mcrypt), these symbols should not been undefined. i haven't a clue
as of what's going on... all the symbols in the config file check out
just fine. (note, i did compile libmcrypt with --disable-posix-threads)
:P
is there something obvious that i'm missing? any help would be greatly
appreciated!
thanx in advance.
----------------
remco chang
bountyquest.com