Uhm... right... I'd believe that except that I have it working on the latest build. I'll attach my directions which I posted to the list a while back. -Philip -----Original Message----- From: Rafael Ernesto Bastidas L. [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 10:08 AM To: Thomas D. Kryger; Php-Install Subject: RE: [PHP-INST] RH7, gd and php4.0.4pl1 newer versions of GD doesnt support JPEG. try to use PNG instead Rafael -----Original Message----- From: Thomas D. Kryger [mailto:[EMAIL PROTECTED]] Sent: Lunes, 21 de Mayo de 2001 01:08 p.m. To: Php-Install Subject: [PHP-INST] RH7, gd and php4.0.4pl1 Hi I need some help installing gd-support with jpeg and png support on my Red Hat 7. I have compiled a version of php4.0.4 witch have support for gd, but when i run this script: <? // create the image $gif = imagecreate(200,200); $bg = ImageColorAllocate($gif,0,0,0); $tx = ImageColorAllocate($gif,255,128,128); ImageFilledRectangle($gif,0,0,200,200,$bg); ImageString($gif,3,70,90,"it works !",$tx); // send the image //header("content-type: image/jpg"); Imagejpeg($gif, 'test.jpg', 100); ?> i get this result: Warning: ImageJpeg: No JPG support in this PHP build in /var/www/html/test.grafik.php on line 11 I have compiled php4.0.4 with this config: --with-mysql --with-apxs --with-gd and i get two warnings telling my to use --with-xpm-dir and/or --with-jpeg-dir i configure fails, but i don't get any errors, just the two warnings i have installed jpeg from jpegsrc.v6b.tar.gz, and libpng from libpng-2.1.0.3-1.i386.rpm, and i assumed that gd is installed by the Red Hat installer. Best regards Thomas D. Kryger www.akvariet.dk www.akvariemarked.dk -- 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]
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]