how to get GD working on php4 under RHEL4?

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
bigjl
Forum Newbie
Posts: 15
Joined: Fri Jan 13, 2006 11:15 am

how to get GD working on php4 under RHEL4?

Post by bigjl »

hi all,
I am trying to use GD lib in my code. But it kept showing "Fatal error: Call to undefined function: imagecreatefromjpeg()". In the phpinfo(), it shows:
' '--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'

Does it mean that GD has already been installed with php4? If so, how can I turn in on?
I am using RHEL4 with Apache and PHP4 buildin package installed.
Please help me out. thnx
roberts
Forum Newbie
Posts: 2
Joined: Mon Mar 05, 2007 7:57 pm

Post by roberts »

hi,

before you install GD, you must install jpeg-6b, libpng, zlib, freetype.

the detail is:

GD 2.0.33
jpeg-6b
libpng 1.2.8
zlib 1.2.3
freetype-2.1.10.tar.gz
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

--with-gd=shared
the extension has been built as module aka shared object.
Start the package manager, search for php-gd and install it. You might have to restart the webserver after that.
Post Reply