Re: gd errors while compiling PHP
| From: | Santosh Narayanan | Date: | Thu, 18 Jul 2002 09:28:37 +0000 |
| Subject: | Re: gd errors while compiling PHP | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-7801@lists.php.net to get a copy of this message | ||
Hi all,
Thanks for the replies to my message regarding gd errors while compiling PHP.
I finally managed to solve it using this method. Note that I am using a Redhat Linux system to do the compile.
1) Compiled and installed libpng 1.2.4
wget www.libpng.org/pub/png/src/libpng-1.2.4.tar.gz
tar zxvf libpng-1.2.4.tar.gz
cd libpng-1.2.4
mv scripts/makefile.linux Makefile
make
make install
2) Compiled and installed libjpeg 6b
wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --enable-shared
make
make install
3) Compiled and installed GD 1.8.4
wget www.boutell.com/gd/http/gd-1.8.4.tar.gz
tar zxvf gd-1.8.4.tar.gz
cd gd-1.8.4
pico Makefile
-------
NOTE: On some systems gd refuses to compile unless you reverse the LIBS line in the Makefile as follows,
LIBS=-lm -lz -lpng -lgd
(save the file using CTRL-X and Y)
-------
make
make install
4) Now configure, compile and install PHP 4.1.2 as follows,
./configure --prefix=/usr --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-libdir=/usr/lib --enable-bcmath --enable-magic-quotes --enable-safe-mode --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-apxs=/usr/sbin/apxs --with-zlib --with-ttf --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-gd=/usr/local --with-gettext=/usr --with-regex=system --with-db --with-gdbm --with-interbase=shared --with-pgsql=shared --with-ldap --with-imap --with-pdflib=/usr --with-mysql
-------
NOTE: The configure line will change depending on what you support you need with PHP, but generally the above configure has support for many common stuff used in PHP.
-------
make > /dev/null
make install
5) Now restart apache (the command to restart apache depends on your system)
/etc/rc.d/init.d/httpd restart
Thats about it. Now check using phpinfo if the newly compiled php works.
regards,
-- Santosh
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com