Linux-Noob Forums
gd not being recognised - Printable Version

+- Linux-Noob Forums (
+-- Forum: Linux Server Administration (
+--- Forum: LAMP (
+--- Thread: gd not being recognised (/thread-2388.html)

gd not being recognised - tek-69 - 2005-10-06

I'm up to making on the fly images with php in the book im using, but something is wrong because i can't get it working. I tried using gd_info() but got the following error.

[client] PHP Fatal error:  Unknown function:  gd_info() in /var/www/html/pathtophpfile/pathtophpfile/gdcheck.php on line 2, referer:


so i checked phpinfo() and it looks like gd is in there but its not acting like it.

Configure Command   './configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--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-pic' '--with-apxs2=/usr/sbin/apxs'

any ideas or thoughts on what i might be doin wrong or how to go about getting it to work properly? I'm pretty sure my php is rpm installed so if i have to recompile i'm kinda screwed.

gd not being recognised - znx - 2005-10-06

Quote:PHP Fatal error:  Unknown function:  gd_info()
Indeed no gd found, thus no gd installed. 


Shared, i.e. external gd lib, so you need gd installed. If it is you can add:



Oh.. RPM installed... hrmm, well I hope its just that the GD library is simply not in its dependencies then.

gd not being recognised - tek-69 - 2005-10-07

so how do i tell php where to find the gd lib ? I know it's in /usr/lib but i can't figure out how to tell php that. am i out of luck cause its rpm? I've never had to reconfig something rpm based so i don't know what im doin. is there a way to tell it where to look via php.ini maybe?

gd not being recognised - tek-69 - 2005-10-07

After alot of digging around in various forums and countless websites, I've come to discover that if anyone else has a similar problem to mine there is hope. So quick recap on the situation first:

I have php installed via rpm.

I have the gd libs also installed via rpm.

gd isn't working.



rpm -qa php-gd

if that produces nothing then

apt-get php-gd


I wish they were all that simple. The research and actually finding out that a php-gd rpm

even exists, was the hardest part. Hope this helps someone else out.