Tuesday, November 20, 2007

windows xp 下免安装版php5 gd2库设置

phpinfo()里的一段信息如下,PHP加载的配置文件默认放到C:\WINDOWS\php.ini下。


Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\WINDOWS\php.ini

打开其中php_gd2.dll模块,注释前面的";"即可,将ext目录下的的php_gd2.dll复制到C:\WINDOWS\system32,重启WEB server,检查phpinfo(),应该有如下类似内容:

gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

No comments :