hvdm_20
08-07-2001, 04:01 PM
how can i recomile gd with libjpeg for a raq4i
php is already installed but i need to recompile php4 too
how must i do this
i found a thread for the raq3
http://www.webhostingtalk.com/showthread.php?threadid=4087&highlight=libjpeg
but thats not good for my
its not a fresh install
thank you...
jucebro
08-09-2001, 02:00 PM
I recently tackled this problem, it took a while, but here is what I did:
I borrowed most of this from Hans's walkthrough. I used php 4.0.6
Php & Gd with Jpeg & png - works on raq 4!!!:
=====================
First of all, download the following:
http://www.freesoftware.com/pub/infozip/zlib/ (zlib.tar.gz)
http://www.boutell.com/gd (gd-1.8.4.tar.gz)
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz (jpegsrc.v6b.tar.gz)
http://www.php.net (php-4.x.x.tar.gz)
http://libpng.sourceforge.net/ (libpng)
Then, log in the shell and delete all gd.h files on your system. You can
find them using:
# find / -name gd.h
If there is more than one, then delete all of them.
Next, remove /usr/lib/libgd.* - be sure to delete only libgd related files.
Now add the following line to the /etc/ld.so.conf file:
/usr/local/lib
Save the file, and run:
/sbin/ldconfig
This was an imported part, because Apache needs this dir to find the correct
modules.
Extract the zlib archive:
# tar -zxvf zlib.tar.gz
# cd zlib-1.1.3
And install it:
# ./configure --shared
# make
# make install
Do the same for the libpng (if you want PNG support)
Now install the JPEG-6b, doing the following:
# tar -zxvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --enable-shared
# make
# make install
Then go one directory back, and extract the GD archive using:
# tar -zxvf gd-1.8.4.tar.gz
# cd gd-1.8.4
Now edit the Makefile (using vi or pico) and check which modules you want. I
removed the Freetype Library (-DHAVE_LIBFREETYPE / -lfreetype). After making
the changes save the file and go back to the shell. Now compile GD:
Note: I didnt have to change anything in the gd Makefile last time I compiled it.
# make
# make install
If this is giving any errors, just remove the modules you don't have (but
don't remove the JPEG lib - we need that one ! :)) )
php
=====================
With GD (remove --with-png-dir=/usr/lib if you don't want PNG support):
# ./configure --libdir=/usr/local --with-apxs=/usr/sbin/apxs --with-gd --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib --with-gettext=/usr --enable-safe-mode --enable-magic-quotes --with-ttf=/usr/lib --enable-track-vars --with-regex=system --with-pgsql=shared --disable-debug --with-interbase=shared --with-ldap --enable-xml --with-zlib --with-mysql --enable-ftp --with-imap
Without GD:
# ./configure --with-apxs=/usr/sbin/apxs --with-zlib-dir=/usr/lib --with-gettext=/usr --enable-safe-mode --enable-magic-quotes --with-ttf=/usr/lib --enable-track-vars --with-regex=system --with-pgsql=shared --disable-debug --with-interbase=shared --with-ldap --enable-xml --with-zlib --with-mysql --enable-ftp --with-imap
Ensim:
# ./configure --with-apxs=/usr/sbin/apxs --with-zlib-dir=/usr/lib --with-gettext=/usr --enable-safe-mode --enable-magic-quotes --enable-track-vars --with-regex=system --disable-debug --enable-xml --with-zlib --with-mysql --enable-ftp
# make
# make install
open the httpd.conf file and modify this line: 'LoadModule php4_module /whatever/'
to look like this: 'LoadModule php4_module /usr/lib/apache/libphp4.so'
comment out this line #AddModule mod_php4.c
Then /etc/rc.d/init.d/httpd restart
jucebro
08-09-2001, 02:03 PM
Originally posted by jucebro
./configure --libdir=/usr/local --with-zlib-dir=/usr/lib --with-pfpro
Ignore this ./configure line. it's what I was using to get PayFlow Pro to work.:stickout
Nevermind - I fixed the post, but I can't delete this one.
WH admins - feel free to delete this post
I exactly did as mentioned above, but when I try to run MRTG after this :
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router '213.196.48.199_140'
Signal was 0, Returncode was 127
/usr/local/mrtg/bin/rateup: error in loading shared libraries: libgd.so.1: cannot open shared object file: No such file or directory
Any idea what's wrong?
hansm
12-13-2001, 10:33 AM
is the php gd working now ??
It is, I did "make test" and got no errors. Is there a way I can test it ?? I don't know anything about gd functions in php.
hennaboy
01-02-2002, 07:02 AM
tyring to do this but get the following:
gcc -I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include -O -DHAVE_LIBPNG -DHAVE_LIBJPEG -c -o gd_png.o gd_png.c
gd_png.c:7: png.h: No such file or directory
What am i doing wrong? thanks
hennaboy
01-02-2002, 02:20 PM
got it to install gd nw but couldnt get it to do it with freetype.
jahsh
01-02-2002, 06:12 PM
when you compile mrtg did you use the options to specify the path to gd? we got mrtg to work on a raq3 so I know its possible. good luck