Eason

咸鱼咯

解决phpcms不显示验证码问题

解决:确保php-gd和freetype.而且确保是先安装了freetype,然后是php-gd;如果是先安装了php-gd,那么在安装完freetype后,需要make clean 然后重新configure php with freetype option,我的如下:

./configure \
–with-mysql \
–with-apxs2=/app/deploy/apache/bin/apxs \
–with-gd \
–enable-exif \
–enable-gd-native-ttf \
–enable-inline-optimization \
–with-zlib \
–with-png-dir \
–with-jpeg-dir=/usr/local/jpeg6 \
–with-freetype-dir=/usr/local/lib \
–with-ttf \
–enable-mbstring \
–with-gettext \
–enable-gd-jis-conv
另外,php-gd可以通过yum install php-gd安装。

最后通过phpinfo()看到的gd信息应该如下:
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.5
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
JIS-mapped Japanese Font Support enabled

, , ,

Comments are currently closed.