1 頁 (共 1 頁)

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

發表於 : 2013-02-23 16:54
心靈捕手
如果您的論壇,因為升級 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

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

發表於 : 2013-02-25 17:19
心靈捕手
以下是官方支援團隊所提供的修改方法:

--開啟--
includes/session.php

--找到--

代碼: 選擇全部

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

代碼: 選擇全部

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

--
參考資料:
https://www.phpbb.com/community/viewtop ... #p13245919

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

發表於 : 2013-02-28 22:13
tonylee5566
這個要保存一下 。。。 以備用 !!

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

發表於 : 2013-03-16 21:27
心靈捕手
tonylee5566 寫:這個要保存一下 。。。 以備用 !!
補充說明:
如果您的論壇有啟用「DEBUG」,那麼升級 PHP 5.4.12 後,論壇才會出現此亂碼。