歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 20, 2024, 10:56:32 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  核心補強  |  lifetype wiht lighttpd « 上篇主題 下篇主題 »
頁: [1]
作者 主題: lifetype wiht lighttpd  (閱讀 10121 次)
ericj
新手見習
*
文章: 43



檢視個人資料 個人網站
« 於: 四月 15, 2006, 01:35:53 上午 »

我最近剛將 lifetype 1.0.3 從 Apache2 +mod_php4 換成 lighttpd + php5-cgi
OS 是FreeBSD 6.1 RC#1

沒有什麼大問題,除了re-write rule還沒完全轉換成功以外
目前最讓我頭大的是lighttpd.error.log裡面的警告訊息

內容大致是這樣
程式碼:
2006-04-15 02:39:18: (mod_fastcgi.c.2536) FastCGI-stderr: PHP Notice:  Object of class SessionInfo could not be converted to int in /home/plog/rss.php on line 30
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Tree.php on line 486
PHP Notice:  Only variable references sh
2006-04-15 02:39:18: (mod_fastcgi.c.2536) FastCGI-stderr: ould be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Tree.php on line 486
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by refe
2006-04-15 02:39:18: (mod_fastcgi.c.2536) FastCGI-stderr: rence in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Tree.php on line 486
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/class/xml/tree/Node.php on line 524
PHP Notice:  Only variable references should be returned by reference in /home/plog/clas
2006-04-15 02:39:18: (mod_fastcgi.c.2536) FastCGI-stderr: s/xml/tree/Tree.php on line 486
PHP Notice:  Object of class BlogSettings could not be converted to int in /home/plog/class/dao/bloginfo.class.php on line 55
PHP Notice:  Object of class BlogSettings could not be converted to int in /home/plog/class/dao/bloginfo.class.php on line 55
PHP Notice:  Undefined index:  smileys in /home/plog/class/plugin/pluginmanager.class.php on line 265

當有人連線網誌時就會一直出現這些警告訊息
是因為程式寫法的關係嗎?
已記錄

Pentium4 1.5GHz + 512MB SDRAM + 200G vinum mirror RAID
FreeBSD6.1+lighttpd+php5-cgi+MySQL5.1
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 四月 15, 2006, 11:26:29 上午 »

這並非是 lighttpd 的問題,這是因為你使用 php5。

目前 1.0.3 雖然可以在 PHP5 使用,但是因為 PHP5 的語法大量改變,變成 LifeType 執行時會有 notice.

解決的方式:把 error_reporting 的 level 降低 改為 E_ALL & ^E_NOTICE

另外,就是 1.1 應該是完全修改這些語法了。所以等 1.1 也是個方式。

Mark
已記錄

ericj
新手見習
*
文章: 43



檢視個人資料 個人網站
« 回覆文章 #2 於: 四月 16, 2006, 07:32:27 下午 »

感謝,原來是php5語法的問題阿~
我去看了一下 php.ini的設定檔

; Examples:
;
;   - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors
;
error_reporting  =  E_ALL & ~E_NOTICE

設定成
error_reporting = E_ALL && ~E_NOTICE
就好囉 吐舌頭

感謝 mark 的幫忙 微笑
已記錄

Pentium4 1.5GHz + 512MB SDRAM + 200G vinum mirror RAID
FreeBSD6.1+lighttpd+php5-cgi+MySQL5.1
頁: [1]
LifeType 中文開發論壇  |  開發  |  核心補強  |  lifetype wiht lighttpd « 上篇主題 下篇主題 »
    前往: