Demo

討論

保持飢餓,保持愚笨 (Stay hungry, stay foolish)。 史蒂夫·賈伯斯

公告

本網站已取消討論區的討論方式,如果您有問題請至LINE群行動條碼圖片網址,或Facebook社團

升級 php5.2.11 後,出現preg_replace().....

  • epstudio
  • epstudio 的個人頭像 Topic Author
  • 訪客
  • 訪客
2009-10-01 00:13 #15863 來自 epstudio
epstudio created the topic: 升級 php5.2.11 後,出現preg_replace().....
之前用 php5.1.6 安裝了 joomla 1.5.14 ~

這兩天把 php 升級至 5.2.11 並更新所有的 extension ,完成後卻發現 joomla 出問題了!

頁面上出現一堆「Warning: preg_replace() [function.preg-replace]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/xxx/libraries/joomla/methods.php on line 58」

這一行寫的是
$url = preg_replace('/\s/u', '%20', $url);

檢查過:
pcre-7.9 Perl Compatible Regular Expressions library
php5-pcre-5.2.11 The pcre shared extension for php

Compiled with
UTF-8 support
Unicode properties support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack


就是不知道為什麼 joomla 會說目前的 PCRE 不支援 UTF8 ~
不知道板上有先進欲過類似狀況嗎?

自行測試結果,把這行註解掉就一切正常了,不過還是不知道原因~

Please 登入 to join the conversation.