[分享] 升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息)的解決方法

phpBB Installation & Usage Support
phpBB 3 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 3.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8510
註冊時間: 2004-04-30 01:54
來自: Taiwan

[分享] 升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息)的解決方法

文章 心靈捕手 »

如果您的論壇,因為升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息如下),

代碼: 選擇全部

[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2230: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4823: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3847)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4825: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3847)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4826: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3847)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4827: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3847)
那麼建議您參考以下的修正方法。

--開啟--
includes/session.php

--找到--

代碼: 選擇全部

        return strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']);
--取代成--

代碼: 選擇全部

        return @strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']);
--儲存與關閉--

--
參考資料:
https://www.phpbb.com/community/viewtop ... &t=2173039
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8510
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [分享] 升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息)的解決方法

文章 心靈捕手 »

以下是官方支援團隊所提供的修改方法:

--開啟--
includes/session.php

--找到--

代碼: 選擇全部

'lang'          => $this->lang['datetime'],
--取代成--

代碼: 選擇全部

'lang' => array_filter($this->lang['datetime'], 'is_string'),
--儲存與關閉--

--
參考資料:
https://www.phpbb.com/community/viewtop ... #p13245919
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
tonylee5566
星球公民
星球公民
文章: 31
註冊時間: 2012-05-27 17:26
聯繫:

Re: [分享] 升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息)的解決方法

文章 tonylee5566 »

這個要保存一下 。。。 以備用 !!
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8510
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [分享] 升級 PHP 5.4.12 後,論壇出現亂碼(錯誤訊息)的解決方法

文章 心靈捕手 »

tonylee5566 寫:這個要保存一下 。。。 以備用 !!
補充說明:
如果您的論壇有啟用「DEBUG」,那麼升級 PHP 5.4.12 後,論壇才會出現此亂碼。
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
主題已鎖定

回到「[3.0.x] 安裝與使用」