2011-12-16 68 views
0

我在nginx的日誌中出現以下錯誤:不能重新聲明的sanitize()錯誤

2011/12/16 13:52:30 [error] 7490#0: *1000 FastCGI sent in stderr: "PHP Fatal error: Cannot redeclare sanitize() (previously declared in /usr/share/www/includes/class_downloads.php:4) in 
    /usr/share/www/includes/class_downloads.php on line 17" while reading response header from upstream, client: 192.0.0.1, server: localhost, request: 
"GET /aaf104/fullmetal-alchemist-brotherhood-video22/index.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.com" 

我所有的網站都出現了同樣的錯誤:

Fatal error: Cannot redeclare sanitize() (previously declared in 
/usr/share/www/includes/class_downloads.php:4) in 
/usr/share/www/includes/class_downloads.php on line 17 

配置:

的Ubuntu 10.04 .3 LTS,nginx/0.7.65,PHP 5.3.5-1ubuntu7.2ppa1〜lucid(fpm-fcgi)

nginx config

fastcgi config

site config

有人能幫助我嗎?我知道你不會檢查所有的配置等,但我會很感激任何提示來解決這個問題。

回答

0

錯誤消息是顯式的。你有一個函數「sanitize()」在你的代碼中出現多次。首先在/usr/share/www/includes/class_downloads.php的第4行,然後在同一個文件的第17行。

PHP函數只能在碼流中出現一次。

+0

當我們禁用所有插件時,錯誤消失。看起來,某個模塊被遺漏或存在另一個服務器配置問題。我們的服務器從崩潰中恢復,現在很難恢復其配置。只是爲了您的參考,我試圖用include_once等替換所有包含。謝謝您的回覆和抱歉,由於缺乏聲譽,我無法投票給您的帖子。 – Andrew 2011-12-18 01:45:37

相關問題