我需要速戰速決,爲PHP來防止攻擊我與服務器取下來到php bug #53632與下面的解決了PHP錯誤#任何問題53632
我的一些服務器是32位,幷包含各種客戶端的PHP腳本。
理想情況下,我會將PHP修補到最新版本,但同時我認爲使用php.ini auto_prepend_file指令自動包含修補程序會給我一些時間。你能看到這個臨時修復的問題嗎?
所以我編輯我的php.ini文件並添加:
auto_prepend_file = c:\wamp\www\php-53632-fix.php
代碼:
<?php
if ($_REQUEST)
{
foreach ($_REQUEST as $fixKey => $fixValue)
{
if (strstr(str_replace('.','',$fixValue),'22250738585072011'))
{
unset($_REQUEST[$fixKey]);
unset($_COOKIE[$fixKey]);
unset($_POST[$fixKey]);
unset($_GET[$fixKey]);
$GLOBALS[$fixKey]="";
}
}
reset($_REQUEST);
unset($fixKey);
unset($fixValue);
}
if ($_SERVER)
{
foreach ($_SERVER as $fixKey => $fixValue)
{
if (strstr(str_replace('.','',$fixValue),'22250738585072011'))
{
unset($_SERVER[$fixKey]);
$GLOBALS[$fixKey]="";
}
}
reset($_SERVER);
unset($fixKey);
unset($fixValue);
}
相關:http://stackoverflow.com/questions/4605590/php-float-bug-php-hangs-on-numeric-value/4606026#4606026 – marcog 2011-01-06 00:28:09
它說它已經被修復了。那麼,升級比補丁更好? – 2011-01-07 09:27:05