Page 1 of 1

how to get GD working on php4 under RHEL4?

Posted: Fri Feb 16, 2007 5:12 am
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

Posted: Mon Mar 05, 2007 8:21 pm
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

Posted: Tue Mar 06, 2007 1:18 am
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.