歡迎光臨, 訪客. 請先 登入註冊一個帳號.
五月 05, 2024, 05:53:31 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  转移了一个比较大的blog到另一台服务器, 出现了下面的提示...请指点..谢谢! « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 转移了一个比较大的blog到另一台服务器, 出现了下面的提示...请指点..谢谢!  (閱讀 13733 次)
yufeng
新手見習
*
文章: 39


檢視個人資料
« 於: 七月 19, 2006, 10:39:46 下午 »

把blog转移到另一台服务器上, 从apache2.0转移到了apache1.3上. 两个服务器的mysql版本一致, 但是监听的端口不一样, 经过lss的指点, 已经可以连到数据库了....域名指向也进行了转移...基本完成后在访问summary.php页面时在页面最顶端会出现下面的错误提示:
程式碼:
Exception message: Cannot modify header information - headers already sent by (output started at /home/lifetype/public_html/class/summary/action/summarydefaultaction.class.php:159)
Error code: 2
-- Backtrace --
/home/lifetype/public_html/class/summary/view/summarycachedview.class.php(120): header
/home/lifetype/public_html/class/controller/controller.class.php(329): summarycachedview.render
/home/lifetype/public_html/summary.php(86): summarycontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at /home/lifetype/public_html/class/summary/action/summarydefaultaction.class.php:159)
Error code: 2
-- Backtrace --
/home/lifetype/public_html/class/view/view.class.php(316): header
/home/lifetype/public_html/class/summary/view/summarycachedview.class.php(127): view.render
/home/lifetype/public_html/class/controller/controller.class.php(329): summarycachedview.render
/home/lifetype/public_html/summary.php(86): summarycontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at /home/lifetype/public_html/class/summary/action/summarydefaultaction.class.php:159)
Error code: 2
-- Backtrace --
/home/lifetype/public_html/class/view/view.class.php(177): header
/home/lifetype/public_html/class/view/view.class.php(318): summarycachedview.sendcontenttype
/home/lifetype/public_html/class/summary/view/summarycachedview.class.php(127): view.render
/home/lifetype/public_html/class/controller/controller.class.php(329): summarycachedview.render
/home/lifetype/public_html/summary.php(86): summarycontroller.process
[/code

不知道是那里的输出有问题了...请指点...谢谢
已記錄

服务器环境:
LINUX RH ES3/PHP 4.4.0/MySQL 4.1.11/Apache 2.0.54
======================
调试环境:
Win2003/PHP 4.4.1/MySQL 4.1.11/Apache 2.0.54
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #1 於: 七月 20, 2006, 09:54:58 上午 »

程式碼:
Exception message: Cannot modify header information - headers already sent by (output started at /home/lifetype/public_html/class/summary/action/summarydefaultaction.class.php:159)
.....
不知道是那里的输出有问题了...请指点...谢谢
這個錯誤訊息,通常都是因為自行修改過程式,但是存檔時存成 utf8 with BOM 造成的,請用 utf8 with NO BOM 再存檔一次就行了。

唉~~~ 又是 FAQ  傷心

lss
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
bulleta
新手見習
*
文章: 3


檢視個人資料
« 回覆文章 #2 於: 九月 26, 2006, 02:33:42 下午 »

我也遇到類似問題
但我是第一次安裝,也沒修改過
大部分功能都沒問題
但是每一頁都有以下的錯誤碼
程式碼:
Logged in user: bulleta
Exception message: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs\plog\class\action\blogaction.class.php:1)
Error code: 2
-- Backtrace --
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(323): header
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\smartyview.class.php(226): view.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\blogview.class.php(252): smartyview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\defaultview.class.php(82): blogview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\controller\controller.class.php(330): defaultview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\index.php(50): blogcontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs\plog\class\action\blogaction.class.php:1)
Error code: 2
-- Backtrace --
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(175): header
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(325): defaultview.sendcontenttype
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\smartyview.class.php(226): view.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\blogview.class.php(252): smartyview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\defaultview.class.php(82): blogview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\controller\controller.class.php(330): defaultview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\index.php(50): blogcontroller.process
請問是什麼問題?
可以解缺嗎?
先謝謝回答
已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #3 於: 九月 26, 2006, 04:16:52 下午 »

hi bulleta:

如果是新安裝,又沒修改過任何程式的話,那真的很抱歉,你得提供更多訊息(請看如何在論壇發問)才能幫你了。

一般狀況判斷,這都是 BOM 造成的問題  傷心

lss
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
bulleta
新手見習
*
文章: 3


檢視個人資料
« 回覆文章 #4 於: 九月 27, 2006, 09:26:31 上午 »

你好, iss:
我的os是windows xp
php是4.3.1,mysql是4.1
安裝目錄是c:\Program Files\Apache Group\Apache\htdocs\plog\
有空格..怎麼辦@@?
在一般閱讀頁面(index.php)會出現以下錯誤碼
程式碼:
Logged in user: bulleta
Exception message: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs\plog\class\action\blogaction.class.php:1)
Error code: 2
-- Backtrace --
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(323): header
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\smartyview.class.php(226): view.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\blogview.class.php(252): smartyview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\defaultview.class.php(82): blogview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\controller\controller.class.php(330): defaultview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\index.php(50): blogcontroller.process

Exception message: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs\plog\class\action\blogaction.class.php:1)
Error code: 2
-- Backtrace --
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(175): header
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\view.class.php(325): defaultview.sendcontenttype
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\smartyview.class.php(226): view.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\blogview.class.php(252): smartyview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\view\defaultview.class.php(82): blogview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\class\controller\controller.class.php(330): defaultview.render
C:\Program Files\Apache Group\Apache\htdocs\plog\index.php(50): blogcontroller.process
迴響完成也會只出現以上錯誤碼,但按上一頁可以知道迴響成功的
另外在管理介面全域設定會出現下面的錯誤碼
程式碼:
Parse error: parse error in C:\Program Files\Apache Group\Apache\htdocs\plog\class\template\smarty\Smarty_Compiler.class.php(273) : regexp code on line 2

Fatal error: Failed evaluating code: '{php' . str_repeat(" ", substr_count('{* we have to do it like this... otherwise it doesn''t look nice on the browser textbox *}', " ")) .'}' in C:\Program Files\Apache Group\Apache\htdocs\plog\class\template\smarty\Smarty_Compiler.class.php on line 273

其他功能基本沒問題
有試過1.0.6版本,除了可以閱讀外其他功能完全不能用
而1.1版本出現上面的問題
請問是什麼問題?
怎樣可以記錄時轉成 utf8 with NO BOM ?
最後謝謝ISS的回答@@
« 最後編輯時間: 九月 27, 2006, 09:36:18 上午 由 bulleta » 已記錄
bulleta
新手見習
*
文章: 3


檢視個人資料
« 回覆文章 #5 於: 十月 19, 2006, 03:29:08 下午 »

問題解決了
原來只要在php.ini 內output_buffering設定為on就不會出現
謝謝ISS的回答@@
已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #6 於: 十月 19, 2006, 08:42:12 下午 »

hi bulleta:

抱歉,漏掉了你的上一篇文章 吐舌頭 sorry

設定 output_buffering = on ,會強迫所有的 PHP 輸出都先 buffer 起來,待完整後再一次輸出。這樣做確實可以解決因 BOM 比 http header 早送出造成的問題,不過對效能會有一些影響。我想,找出出問題的檔案解決 BOM 才是正途,給你參考。

至於怎麼儲存 UTF8 with NO BOM ?一般來說,有支援 UTF8 的文字編輯器都有選項可以處理。我個人喜歡用 notepad++ ,可以用功能表 > 格式 > 編譯成 UTF-8 碼(無 BOM) ,再存檔即可。

lss
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
頁: [1]
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  转移了一个比较大的blog到另一台服务器, 出现了下面的提示...请指点..谢谢! « 上篇主題 下篇主題 »
    前往: