前不久,有位彰化的朋友寫信問我,關於在Windows20003 下安裝Gallery2的過程中所碰到的一點問題。

由於我並沒有在Windows下安裝 Gallery2 的經驗,所以只能就自己所看過的資料回信給他(那位朋友也還沒回信告訴我是否已安裝成功)。

又有位朋友問了類似的問題,所以就拿上次回信的內容來給需要的人參考看看了。

問題:在Windows2003下安裝Gllery2,過程中出現如下圖的Warning,要怎麼解決? 

在Windows下安裝Gallery2,可以先看看官網上這一篇「Gallery2:Installation on Windows Server 2003 and IIS6」的說明

1.解決第一個gettext的問題

可以先試試這一段的說明:

「But now comes the crux. php_gettext.dll is depending on \php-install-dir\dll\iconv.dll All other extensions work flawlessly for me. But gettext.dll required me to put iconv.dll into a dir that is included in the searchpath. E.g. /windows/system32 I then overreacted and copied all dll's to that /system32 dir. The manual of php 4 tells you to copy the dll's to the /php-install-dir/ but that only works if you add manually the php dir into the path statement of windows.」

在資訊組長聯誼會的網站上之前有討論過Gallery2的問題,其中san有說到

我使用的php版本為4.3.8

當初安裝php 4.3.8時,安裝目錄下的 extensions 並無 php_gettext.dll 這個檔案
可以到 http://www.php.net/downloads.php 下載php-4.4.0-Win32.zip
要將php昇級也可以
或解開php-4.4.0-Win32.zip後,將extensions 中的php_gettext.dll複製到安裝目錄下的extensions目錄中,
再重新動Apache,連上Gallery 2 ,就會自動變成繁體中文語系了!

ps:php_gettext.dll 需要libintl-1.dll 與 iconv.dll 這兩個檔案,所以要先把 PHP/Dlls 下的 libintl-1.dll 與 iconv.dll 複製到 C:\WINNT\SYSTEM32 或 C:\windows\SYSTEM32下才行
.

當然啦!還必須修改 c:\windows\php.ini,將底下一行前面的「;」拿掉

;extension=php_gettext.dll 

若解決了上面的問題,安裝介面應該就會變成中文的了。

2.output_buffering 的問題 

在我這邊的安裝過程上有看到第二個問題的中文說明

警告:你的 PHP 中的輸出緩衝功能被 php.ini 中的 output_buffering 參數打開了。Gallery 仍然可以在這個設定下執行,下載檔案可能還會變快,可是 Gallery 可能會無法傳送太大的檔案(如影片)而且可能會耗盡記憶空間。此外,除非 ini_set() 可以被使用,打開輸出緩衝會使有些如處理進度等的功能無法正確工作

也就是說,在php.ini裡, 若將output_buffering 設成了On,就會出現這個Warning,設成OFF就可以了,所以找找看你的php.ini,改成下面這樣

output_buffering = OFF

需要的人,試試看囉!