mcrypt kills Apache children
| From: | Thalis A. Kalfigopoulos | Date: | Mon, 25 Mar 2002 00:44:24 +0000 |
| Subject: | mcrypt kills Apache children | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89954@lists.php.net to get a copy of this message | ||
I have PHP4.1.2 with libmcrypt4.2.22. I had a script that worked just fine yesterday testing an
mcrypt scenario, and (of course) today it just kills the httpd serving the page and I get this in
error_log:
[Sun Mar 24 08:31:36 2002] [notice] child pid 1049 exit signal Segmentation fault (11)
The script looks more or less as follows:
$input="text";
$key="key";
$enc_descr=mcrypt_module_open(MCRYPT_RIJNDAEL_256,"",MCRYPT_MODE_CBC,"");
srand((double)microtime()*1000000);
$init_vector=mcrypt_create_iv(mcrypt_enc_get_iv_size($enc_descr),MCRYPT_RAND);
mcrypt_generic_init($enc_descr,$key,$init_vector);
$max_key_len=mcrypt_enc_get_key_size($enc_descr);
if(strlen($key)>=$max_key_len){
//truncate the key to a valid length
$key=substr($key,0,$max_key_len);
}
$encrypted_data=mcrypt_generic($enc_descr,$input);
$base64enc_encrypted_data=base64_encode($encrypted_data);
mcrypt_generic_end($enc_descr);
Something I'm missing? I found somewhere on the mcrypt page saying "compile with
--disable-posix-threads". Can anyone verify this is the problem before I get into recompiling
everything?
TIA,
thalis