[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Solution for JPEG support / PHP 4 / RAQ3i +



Hi everyone!

Today I compiled PHP4 successfully with the JPEG support on our RAQ3i. For
the people who want to use the JPEG support too, here's how I did this:

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.0.4pl1.tar.gz)


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 are more than one, then delete all of them.

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

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:

# 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 ! :)) )

Now go back one dir, and extract PHP4:

# tar -zxvf php-4.0.4pl1.tar.gz
# cd php-4.0.4pl1

First remove any cache:

# rm config.cache
# make clean

I used the following line for configuring PHP:

#
./configure --with-mysql --with-apxs --with-gd=/usr/local --with-jpeg-dir=/u
sr/local --enable-ftp

This installs GD, JPEG and the FTP support. After doing this, compile PHP:

# make
# make install

Now restart HTTPD:

# /etc/rc.d/init.d/httpd restart

And your done! To check your install, create a info.php file with source:

<?php phpinfo() ?>

This gives me the following info:

PHP Version 4.0.4pl1
...
gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
JPG Support enabled
PNG Support enabled
WBMP Support enabled

This took me about 2 months before it worked :). ... Hope this helps someone
;)

Regards,


Hans