LifeType 中文開發論壇

開發 => 核心補強 => 主題作者是: ericj 於 四月 15, 2006, 01:35:53 上午



主題: lifetype wiht lighttpd
作者: ericj四月 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

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


主題: Re: lifetype wiht lighttpd
作者: markwu四月 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


主題: Re: lifetype wiht lighttpd
作者: ericj四月 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
就好囉 :p

感謝 mark 的幫忙 :)