LNMP:
RHEL-6.3+Nginx-1.2.2+MySQL-5.5.25a+PHP-5.4.4
cacti-0.8.8a.tar.gz
第1個問題:
在打開cacti頁面時,在頁面上端始終顯示這一行錯誤。
Notice: A session had already been started - ignoring session_start() in /data1/html/cacti/include/global.php on line 154
global.php的內容如下:
第2個問題:
在安裝thold-v0.4.9-3.tgz插件後,在打開cacti左側菜單settings的時候,會出現以下錯誤。
Fatal error: Call to undefined function define_syslog_variables() in /data1/html/cacti/plugins/thold/includes/settings.php on line 132
settings.php內容如下:
這時必須把這個插件卸載,才能恢復正常。由於把thold插件卸載了,打開左側菜單settings,裏面少了Thresholds這個標籤。
解決問題:
第1個問題:
Notice: A session had already been started - ignoring session_start() in /data1/html/cacti/include/global.php on line 154
解決方法:
有兩種方法,我採用第1種方法。
The solution for above problem is
(1)in php.ini file set session.autostart to 0
session.auto_start = 0
(2)In your code use this line
if (!session_id()) session_start();
instead of
session_start();
第2個問題:
Fatal error: Call to undefined function define_syslog_variables() in /data1/html/cacti/plugins/thold/includes/settings.php on line 132
PHP5.3開始便廢除一些較舊的函數,當使用這些函數時,會遇到 E_DEPRECATED 錯誤。
define_syslog_variables(),該函數初始化所有與 syslog 相關的變量。該函數不是必需的,因爲它定義的常量已經被全局定義。廢除這個函數調用應該是有必要的。
解決方法:
編輯 cacti 目錄下 plugins/thold/includes/settings.php,打到132行;並註釋掉該行。問題解決。