Connecting Tech Pros Worldwide Help | Site Map

mcrypt_decrypt causes Apache to crash?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 02:35 AM
M Wells
Guest
 
Posts: n/a
Default mcrypt_decrypt causes Apache to crash?

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:

$myqs=mysql_query($myq);
$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,
MCRYPT_MODE_ECB, $iv);
$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
crash.

Anyone have any idea why this might be crashing?

Many thanks in advance!

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

  #2  
Old July 17th, 2005, 09:10 AM
Sir-Alucard
Guest
 
Posts: n/a
Default Re: mcrypt_decrypt causes Apache to crash?


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

--
Sir-Alucard
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.