In order to build the picture widget, try to add GD2 in current php5.
Steps:
1. Download source
gd-2.0.35 http://www.libgd.org/Downloads wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
zlib 1.2.3 http://www.zlib.net/ I have install before!!
libpng-1.4.0 http://www.libpng.org/pub/png/libpng.html wget http://prdownloads.sourceforge.net/libpng/libpng-1.4.0.tar.gz?download
freetype http://sourceforge.net/projects/freetype wget http://sourceforge.net/projects/freetype/files/freetype2/2.3.11/freetype-2.3.11.tar.gz/download
jpeg http://www.ijg.org/ wget http://www.ijg.org/files/jpegsrc.v8.tar.gz
fontconfig http://www.fontconfig.org/release/ wget http://www.fontconfig.org/release/fontconfig-2.8.0.tar.gz

2. install
(1)libpng
./configure –prefix=/usr/local/libpng2
make
make install
(2)freetype
./configure –prefix=/usr/local/freetype2
make
make install
(3)jpeg
./configure -prefix=/usr/local/jpeg-8 –enable-shared –enable-static
make
make install
vi /etc/ld.so.conf (Add one line in this file: /usr/local/jpeg-8/lib)
(4)fontconfig
./configure –prefix=/usr/local/fontconfig –disable-docs –sysconfdir=/etc –mandir=/usr/share/man –with-freetype-config=/usr/local/freetype2/bin/freetype-config
make
make install
(5)gd2
CPPFLAGS=”-I/usr/local/freetype2/include -I/usr/local/jpeg-8/include -I/usr/local/libpng2/include -I/usr/local/fontconfig/include”
./configure –prefix=/usr/local/gd2 –with-zlib=/usr/local/zlib –with-png=/usr/local/libpng2 –with-jpeg=/usr/local/jpeg-8 –with-freetype=/usr/local/freetype2 –with-fontconfig=/usr/local/fontconfig
make
make install
(
There are some errors might be happened:
1. configure.ac:64: error: possibly undefined macro: AM_ICONV
Sol: install gettext and gettext-devel
2. make[2]: *** [gd_png.lo] Error 1
Sol: edit the file, gd_png.c, and modify “png.h” to “/usr/local/libpng2/include/png.h”
3. ./.libs/libgd.so: undefined reference to `png_check_sig’
Sol:edit the file, gd_png.c, and modify “if (!png_check_sig (sig, 8)) { /* bad signature */” to “if (png_sig_cmp (sig, 0, 8)) { /* bad signature */”
)

(6) rebuild php
./configure [ORIGINAL SETTINGS] –with-zlib-dir=/usr/local/src/zlib-1.2.3 –with-libxml-dir=/usr/lib/ –with-xsl=/usr/lib –with-gd=/usr/local/gd2/ –with-jpeg-dir=/usr/local/jpeg-8/ –with-png-dir=/usr/local/libpng2/ –with-freetype-dir=/usr/local/freetype2/ –enable-mbstring
make
make install

3. restart apache and check the phpinfo