Bug #11101 Updated: Php has caused an error in PHP4TS.DLL
| From: | sniper@php.net | Date: | Fri, 15 Jun 2001 02:34:11 +0000 |
| Subject: | Bug #11101 Updated: Php has caused an error in PHP4TS.DLL | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56827@lists.php.net to get a copy of this message | ||
ID: 11101
Updated by: sniper
Reported By: admin@webfroggie.com
Old-Status: Open
Status: Feedback
Bug Type: Reproducible crash
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
Does this happen with other scripts?
Have you tried reinstalling? I had troubles with
having two different versions of php4ts.dll in my system..
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-05-24 19:00:35] admin@webfroggie.com
Hi,
I have the following machine:
- Windows ME
- Xitami server(just installed)
- PHP 4.05 (just installed)
When running this script:
-------------------------
<?php
// Class Made By Mukul Sabharwal [mukulsabharwal@yahoo.com]
// http://www.devhome.net/php/
// On October 21, 2000
// Updated February 24, 2001
// Now passes RC4 Vector Harness
class rc4crypt {
function endecrypt ($pwd, $data, $case) {
if ($case == 'de') {
$data = urldecode($data);
}
$key[] = "";
$box[] = "";
$temp_swap = "";
$pwd_length = 0;
$pwd_length = strlen($pwd);
for ($i = 0; $i <= 255; $i++) {
$key[$i] = ord(substr($pwd, ($i % $pwd_length), 1));
$box[$i] = $i;
}
$x = 0;
for ($i = 0; $i <= 255; $i++) {
$x = ($x + $box[$i] + $key[$i]) % 256;
$temp_swap = $box[$i];
$box[$i] = $box[$x];
$box[$x] = $temp_swap;
}
$temp = "";
$k = "";
$cipherby = "";
$cipher = "";
$a = 0;
$j = 0;
for ($i = 0; $i < strlen($data); $i++) {
$a = ($a + 1) % 256;
$j = ($j + $box[$a]) % 256;
$temp = $box[$a];
$box[$a] = $box[$j];
$box[$j] = $temp;
$k = $box[(($box[$a] + $box[$j]) % 256)];
$cipherby = ord(substr($data, $i, 1)) ^ $k;
$cipher .= chr($cipherby);
}
if ($case == 'de') {
$cipher = urldecode(urlencode($cipher));
} else {
$cipher = urlencode($cipher);
}
return $cipher;
}
}
$rc4 = new rc4crypt;
echo "<BR><BR>";
$msg="mmmmmmmmmmmmmmmmmmmmmmm3mmmmmmmmmmmm";
$d = $rc4->endecrypt("hi div", $msg, "");
echo $d;
?>
--------------------------
I get the following error:
--------------------------
"Php has caused an error in PHP4TSDLL.
Php will now close.
If you continue to experience problems,
try restarting your computer."
--------------------------
...and I did restart... but the message wont go away! I uploaded the script to a unix server running
apache with PHP v. 4.01pl and it works fine...
Also, if we change the variable $msg to, for example, "abc" it works...
Any ideas?!
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11101&edit=2