雖然我多次編譯php 5.5.10,但仍然無法獲得webp支持啓用,這是由「http://cn2.php.net/manual/zh/function.imagewebp.php」描述的。 這裏是我的編譯設置:如何編譯php以啓用webp支持?
CentOS release 5.8 (Final) x86_64
freetype-2.4.6
jpeg-8c
libpng-1.2.35
gd-2.1.0
PHP編譯命令
./configure --prefix=/apps/lib/php-5.5.10 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd --enable-fpm --enable-mbstring --enable-mbregex --with-zlib-dir=/apps/lib/zlib --enable-pcntl --enable-sockets --enable-ftp --enable-soap --enable-bcmath --disable-debug --enable-sockets --enable-inline-optimization --disable-rpath --with-mysql=/apps/svr/mysql5 --with-libxml-dir=/apps/lib/libxml --with-jpeg-dir=/apps/lib/jpeg --with-iconv-dir=/apps/lib/libiconv --with-mcrypt=/apps/lib/libmcrypt --with-freetype-dir=/apps/lib/freetype --with-gd=/apps/lib/gd-2.1.0 --with-openssl-dir=/apps/lib/openssl --with-openssl=/apps/lib/openssl --with-curl=/apps/lib/curl --with-png-dir=/apps/lib/libpng --enable-opcache=no
,雖然我按照步驟通過 'http://techglimpse.com/install-upgrade-php55-yum/' 安裝PHP終於得到這個輸出GD
gd
GD Support => enabled
GD Version => 2.1.0-alpha
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.6
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.2.35
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
5.5.9使用remi.repo,我終於從這個輸出獲得了成功信號gd
gd
GD Support => enabled
GD Version => 2.1.0
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.2.1
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.2.10
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled
對於系統管理員的關注,我需要部署php的編譯版本。 編譯php或lib gd時我錯過了什麼重要的東西嗎?
我認爲這應該以超級用戶的身份提出。 – enapupe
嗨@enapupe,你會更具體嗎? 「被超級用戶問」我不明白。 – criver
http://superuser.com/ – enapupe