czamora Posted July 24, 2006 Share Posted July 24, 2006 Hi,My current php installation (version 4.3.9) was built with GD:--with-gd=shared --enable-gd-native-ttf --without-gdbm but when I try to use any GD functions I get:PHP Fatal error: Call to undefined function: imagefontheight()GD is installed on my system (Linux Centos 4.3), as indicated by yum, and by the fact that Webmin uses it.I have tried loading it as an extension, by including the lineextension=libgd.soin a file inside /etc/php.d, but it does not find that library. If I link /usr/lib/php4/libgd.so to the actual library file in /usr/lib/libgd.so.2, then it complains that the file is not a php extension library.I don't know what else to do, or what can be wrong.Any help will be greatly appreciated.get_loaded_extensions() gives:Array( \[0] => yp [1] => xml [2] => wddx [3] => tokenizer [4] => sysvshm [5] => sysvsem [6] => standard [7] => sockets [8] => shmop [9] => session [10] => pspell [11] => posix [12] => pcre [13] => overload [14] => mime_magic [15] => iconv [16] => gmp [17] => gettext [18] => ftp [19] => exif [20] => dio [21] => dbx [22] => dba [23] => curl [24] => ctype [25] => calendar [26] => bz2 [27] => bcmath [28] => zlib [29] => openssl [30] => apache2handler [31] => mysql)The complete ./configure options for php were:./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd=shared --enable-gd-native-ttf --without-gdbm --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-xml --with-expat-dir=/usr --with-dom=shared,/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --with-xmlrpc=shared --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --with-imap=shared --with-imap-ssl --with-kerberos --with-ldap=shared --with-mysql=shared,/usr --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic=/usr/share/file/magic.mime --with-apxs2=/usr/sbin/apxs Quote Link to comment Share on other sites More sharing options...
effigy Posted July 24, 2006 Share Posted July 24, 2006 What does this show?[code]<?phpvar_dump(gd_info());?>[/code] Quote Link to comment Share on other sites More sharing options...
czamora Posted July 26, 2006 Author Share Posted July 26, 2006 I'm afraid trying to call that method also produces the same result:PHP Fatal error: Call to undefined function: gd_info() Quote Link to comment Share on other sites More sharing options...
effigy Posted July 26, 2006 Share Posted July 26, 2006 Are you sure your configure went ok? Did you tee the configure and make processes and check for errors? Are you sure you ran [tt]make install[/tt] if you happen to be upgrading? (I've forgotten this before.) Where is [tt]libgd.so[/tt] located? Quote Link to comment Share on other sites More sharing options...
czamora Posted July 26, 2006 Author Share Posted July 26, 2006 Well, I don't know if the configure went ok, because it was done by the company hosting my server. I think they have a standard image that they copy to new servers, so they probably did not compile php directly on my server. And in fact, they probably never compiled it anywhere, but installed it from a binary distribution (with 'yum install php').Regarding the location of libgd.so, these are the files I found:/usr/lib/libgd.so.2/usr/lib/libgd.so/usr/lib/libgdbm.so.2/usr/lib/libgd.so.2.0.0/usr/lib/libgdbm.so.2.0.0of which /usr/lib/libgd.so and /usr/lib/libgd.so.2 are links to /usr/lib/libgd.so.2.0.0Any ideas? Quote Link to comment Share on other sites More sharing options...
czamora Posted July 30, 2006 Author Share Posted July 30, 2006 Any hints, anyone? Quote Link to comment Share on other sites More sharing options...
effigy Posted July 31, 2006 Share Posted July 31, 2006 I would contact your hosting company since they did the installation. Show them a simple test case that fails, such as the gd_info. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.