Date: 06/14/01
- Next message: sniper <email protected>: "[PHP-DEV] Bug #11525 Updated: isapi install fix for win2k"
- Previous message: mikehatesspam <email protected>: "[PHP-DEV] Bug #11226 Updated: Unable to reference functions inside a class via "Variable Funcitons""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 11101
Updated by: sniper
Reported By: admin <email protected>
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 <email protected>
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 <email protected>]
// 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
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sniper <email protected>: "[PHP-DEV] Bug #11525 Updated: isapi install fix for win2k"
- Previous message: mikehatesspam <email protected>: "[PHP-DEV] Bug #11226 Updated: Unable to reference functions inside a class via "Variable Funcitons""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

