Today a PHP development to find the door, said a server GD library can not use
Look at the compiled GD library path is /usr/local/gd
/usr/local/php/bin/php-config |grep--color=auto GD
--ldflags [-l/usr/kerberos/lib64-l/usr/local/lib-l/usr/local/libjpeg/lib-l/usr/local/libpng/lib-l/usr/local /freetype/lib-l/usr/local/gd/lib-l/usr/local/mysql/lib]
--libs [-lcrypt-lz-lcrypt-lmysqlclient-lmcrypt-lltdl-lgd-lfreetype-lpng-lz-ljpeg-lcurl-lbz2-lz -lrt-lm-ldl-lnsl-lrt-lxml2-lz-lm-lssl-lcrypto-ldl-lz-lcurl-lidn-lssl-lcrypto-lrt-lssl-lcrypto-ldl-lz -lz-lxml2-lz-lm-lssl-lcrypto-ldl-lz-lxml2-lz-lm-lxml2-lz-lm-lcrypt-lxml2-lz-lm-lxml2-lz-lm-lxml2-lz -lm-lxml2-lz-lm-lcrypt]
--configure-options [--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/ MySQL--with-mysqli=mysqlnd--with-iconv-dir=/usr/local--with-freetype-dir=/usr/local/freetype--with-jpeg-dir=/ Usr/local/libjpeg--with-png-dir=/usr/local/libpng--with-zlib--with-libxml-dir=/usr--enable-xml--disable-rpath- -enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl=/usr/local-- Without-curlwrappers--enable-mbregex--enable-fpm--enable-mbstring--with-mcrypt --with-gd=/usr/local/gd --enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-xmlrpc--enable-soap-- Without-pear--enable-zip--with-bz2--enable-calendar--enable-ftp--enable-ctype--enable-exif--disable-ipv6-- With-sqlite3--with-gettext--disable-pdo--disable-phar]
LDD view Lib file with the path, found that GD with the Lib is
Ldd/usr/local/php/bin/php|grep JP
libjpeg.so.7 =/usr/local/libjpeg/lib/libjpeg.so.7 (0x00002b5541e18000)
libjpeg.so.62 =/usr/lib64/libjpeg.so.62 (0x00002b5542f1c000)
Ldd/usr/local/php/bin/php|grep GD
libgd.so.2 =/usr/lib64/libgd.so.2 (0x00002b8dc7002000)
MD5 and LL see if it's the same file
Md5sum/usr/lib64/libgd.so.2
a4d9246143fc28542bea0774c073c863 /usr/lib64/libgd.so.2
Ll/usr/lib64/libgd.so.2
lrwxrwxrwx 1 root root 2014/usr/lib64/libgd.so.2-libgd.so.2.0.0
LL/USR/LOCAL/GD/LIB/LIBGD.
LIBGD.A libgd.la libgd.so libgd.so.2 libgd.so.2.0.0
Ll/usr/local/gd/lib/libgd.so.2
lrwxrwxrwx 1 root root 10:20/usr/local/gd/lib/libgd.so.2-libgd.so.2.0.0
Md5sum/usr/local/gd/lib/libgd.so.2
cdb329af5b013d40d79f29f02ba1b275 /usr/local/gd/lib/libgd.so.2
Obviously inconsistent, so you can only recompile PHP
This article is from the "Deven Blog" blog, make sure to keep this source http://wwdhks.blog.51cto.com/839773/1703205
PHP GD Library is not installed problem confirmation