Well, I've got a nice howto for you all. I ended up giving up on gd 2.0.1
altogether and grabbed gd 1.8.4 which seems to work great. SO. Here's a step
by step how to do it (and the libraries you'll need as well). Hope everyone
who was having problems is a much happier person in about an hour. I know I
am. :)

This SHOULD work on anyone's system, however I did this on a RedHat 6.2
setup - and before you rip me about using RedHat, just remember that I got
it working and am helping you. heheh Now all I have to do is resurrect RPM.
Tried to upgrade it and killed it. Oh well. :)

-Philip
Home: 310.996.1316
Work: 310.664.1778
Web:  http://www.bewley.net/~prsnyder
 
 <<howto-apache-php4-gd.txt>> 
I started a complete rebuild of my web server so I could gain access to the
new gd functionality in PHP4. This is a fairly detailed log of the steps I
took to get my gd working and then incorporating it with PHP4 / Apache. I
spent the better part of 2 days trying to get this to work with gd 2.0.1
and to no avail. It is my recommendation that you should just stick with
gd 1.8.4 as it works great and has all the functionality you probably
need. Hope this helps all those out there who have been struggling with
this setup. ;) I'd love to hear from anyone who finds this useful or
perhaps something that needs to be changed. Thanks!

-Philip
Web:   http://www.bewley.net/~prsnyder
Email: [EMAIL PROTECTED]

---------------------------------------------------------------------------
Setting up gd

Libraries Used:

  o freetype-2.0.1.tar.gz   -  http://freetype.sourceforge.net/
  o gd-1.8.4.tar.gz         -  http://www.boutell.com/gd/#getgd
  o jpegsrc.v6b.tar.gz      -  ftp://ftp.uu.net/graphics/jpeg/
  o libpng-1.0.11.tar.gz    -  http://www.libpng.org/pub/png/libpng.html
  o zlib.tar.gz             -  http://www.info-zip.org/pub/infozip/zlib/

zlib:
  1. tar zxvf zlib.tar.gz
  2. cd zlib-1.1.3/
  3. ./configure --shared
  4. make test
  5. make install

  This places zlib in /usr/local, with libraries in /usr/local/lib
  and includes in /usr/local/include.

jpeg:
  1. tar zxvf jpegsrc.v6b.tar.gz
  2. cd jpeg-6b/
  3. ./configure --enable-shared
  4. make
  5. make test
  6. make install

  This places jpeg-v6 in /usr/local, with libraries in /usr/local/lib
  and includes in /usr/local/include.

libpng:
  1. tar zxvf libpng-1.0.11.tar.gz
  2. cd libpng-1.0.11/
  3. cp scripts/makefile.linux makefile
  4. Edit makefile

       Lines 11 - 15:
       # Where the zlib library and include files are located
       ZLIBLIB=/usr/local/lib
       ZLIBINC=/usr/local/include
       #ZLIBLIB=../zlib
       #ZLIBINC=../zlib

  5. make test
  6. make install

  This places libpng in /usr/local, with libraries in /usr/local/lib
  and includes in /usr/local/include.

freetype:
  1. tar zxvf freetype-2.0.1.tar.gz
  2. cd freetype-2.0.1
  3. make setup
  4. make
  5. make install

  This places freetyp in /usr/local, with libraries in /usr/local/lib
  and includes in /usr/local/include.

gd:
  1. tar zxvf gd-1.8.4.tar.gz
  2. cd gd-1.8.4
  3. make
  4. make install

  This places gd in /usr, with libraries in /usr/lib and includes
  in /usr/include.


Yay! Now if all has gone well (and it seemed fairly easy to get this
far) then we're ready for setting up PHP4 & Apache. I've got a bunch
of extra stuff on my web server such as mod_ssl, OpenLDAP, MySQL,
etc. I don't touch on the setup of those packages, but I trust you
will do just fine on your own.



---------------------------------------------------------------------------
And now my web server setup:

  Packages Used:
    o apache_1.3.19.tar.gz
    o php-4.0.5.tar.gz
    o mod_ssl-2.8.2-1.3.19.tar.gz
  
  Prerequisites:
    o MySQL is already installed to /usr/local/mysql
    o OpenSSL is already installed to /usr/local/openssl
    o I also have OpenLDAP installed, but I trust you can
      figure out how to add that in here.

  1. Extract the sources:

       % tar zxvf apache_1.3.19.tar.gz
       % tar zxvf mod_ssl-2.8.2-1.3.19.tar.gz
       % tar zxvf php-4.0.5.tar.gz

  2. Configure mod_ssl
       % cd mod_ssl-2.8.2-1.3.19/
       % ./configure --with-apache=../apache_1.3.19
       % cd ..

  3. Pre-configure apache
       % cd apache_1.3.19/
       % ./configure --prefix=/usr/local/apache
       % cd ..

  4. Configure & build PHP
       % cd php-4.0.5/
       % ./configure \
       > --with-apache=../apache_1.3.19 \
       > --with-mysql=/usr/local/mysql \
       > --with-ldap=/usr/local \     # <---- If you don't have OpenLDAP, remove this.
       > --with-xml \
       > --with-gd \
       > --with-gd-dir=/usr \
       > --with-jpeg-dir=/usr/local \
       > --enable-track-vars \
       > --enable-shared
       % make
       % make install
       % cd ..

  5. Configure Apache
       % cd apache_1.3.19/
       % SSL_BASE=/usr/local/openssl \
       > RSA_BASE=../rsaref-2.0/local \  # <---- You may or may not have RSARef... its 
a US requirement
       > ./configure \
       > --with-layout=Apache \
       > --prefix=/usr/local/apache \
       > --activate-module=src/modules/php4/libphp4.a \
       > --enable-module=expires \
       > --enable-module=headers \
       > --enable-module=php4 \
       > --enable-module=so \
       > --enable-module=ssl \
       > --enable-module=usertrack \
       > --enable-module=vhost_alias \
       > --enable-shared=php4 \
       > --enable-shared=ssl \
       > --enable-rule=SHARED_CHAIN \
       > --enable-rule=SHARED_CORE \
       > --enable-rule=EAPI
       % make
       % make certificate TYPE=custom
       % make install



And that should be it! Mine appears to be working, so I'm
pretty happy. Hope you are able to get this far as well!

-Philip
Web:   http://www.bewley.net/~prsnyder
Email: [EMAIL PROTECTED]





-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to