By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,849 Members | 2,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,849 IT Pros & Developers. It's quick & easy.

mcrypt_decrypt causes Apache to crash?

P: n/a
Hi All,

I'm trying to implement encryption to protect data in my database. I
started by experimenting with the following code, just to make sure I
know how to encrypt and then decrypt but for some reaqson when I add
the line "$plaintext = mcrypt_decrypt(..." etc Apache crashes.

I'm using:

- PHP 4.3.2
- Apache 1.3.24
- Windows XP

Following is an except of my code:

$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "This is a very secret key";

while ($myqr = mysql_fetch_array($myqs)){

$text = $myqr["entry"];
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text,
$plaintext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key,
$crypttext, MCRYPT_MODE_ECB);
echo $plaintext."<p>";

If I remove the line "$plaintext = mcrypt_decrypt(.." Apache doesn't

Anyone have any idea why this might be crashing?

Many thanks in advance!

Much warmth,

Building a thoughtful planet,
One quirky comment at a time.
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Hi, i have experienced the same problem. In my situation it was easy.
was using apache 1.3x.x but then i found that you can avoid thes
crashes using mcrypt with apache 2.0 and up. Hope this helps.
(Sorry by my english

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.