![]()  | 
	
		
 Server Admin Gurus - How Hard to Install GD? 
		
		
		see topic... 
	 | 
		
 Introduction 
	This document describes the installation of the GD graphics library on Linux for use with PHP. We are using an old version of this library since newer versions do not allow the generation of gif files due to patent problems. I've assumed that you have Apache and PHP installed in /usr/local/etc/php as per my instructions. Getting GD 1. You need to be working as root to install gd. su root 2. I like to keep a copy of my downloaded programs in /usr/local/download So create this directory if you don't already have one. 3. You can download version 1.3 from my server. I decided to distribute it because it can be quite hard to find. 4. Save the file as: /usr/local/download/gd1.3.tar.gz using these commands: cd /usr/local/download ftp ftp.e-gineer.com cd pub cd gd bin get gd1.3.tar.gz bye Installing GD 1. First we have to unpack the download. We are going to install it into /usr/local/gd1.3. I've used a pretty cryptic tar command below to do it all in one hit. cd /usr/local/download tar xzf gd1.3.tar.gz -C .. 2. Let's make the GD stuff easy to find: cd .. ln -s gd1.3 gd 3. Now we need to compile everything: cd gd make Checking it Worked 1. You can run the gddemo program to check that the installation is working: ./gddemo 2. This demo program generates a gif file: demoout.gif which you can look at in your browser by downloading it from your server or calling up the file directory. Adding GD Support to PHP 1. Jump into the php installation directory: cd ../etc/php 2. We need to configure PHP to use GD. You should just use the configure command that you used last time and add --with-gd=/usr/local/gd to it. If you followed my instructions for installing PHP with MySQL then your configure command will look like this: ./configure --with-apache=../httpd --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=/usr/local/gd 3. Make the new PHP library: make make install 4. Now we have to remake apache to use the new PHP: cd ../httpd make make install Reader's Comments - Add Comment | Add an Email Alert Hi, don't use this line: ./configure --with-apache=../httpd --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=/usr/local/gd take this one: ./configure --with-apache=../httpd --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=/usr/local/etc/gd and before you install your Apache stop it: bin/apachectl stop make install bin/apachectl start enjoy! -- Oliver Düvel (Mar 4, 2000 18:22:02) Will this still work if I use the current gd? Will the only difference be that I will produce png files vz. gifs? Thanks! -- J Blair (Apr 24, 2000 01:56:10) How do I compile PHP to use freetype and gd. My phpinfo() is showing gd version 1.3 without "freetype support" after it. PHP in not recongnize imagettftext() Thanks. -- tom lin (Sep 8, 2000 20:40:52) I am having problems compiling php with gd. ./configure works fine, but make gives all sorts of errors starting that it can't find limits.h and string.h in /usr/include even though they exist there. This is incredible consendering these are bogstandard headers. The php version is 3.0.18 configured with gd ftp and mysql. The box runs redhat 6.2 -- mark crawford (Jan 6, 2001 14:21:58) Hi guys, how do you get php4 to complie with GD-1.8 support for JPEG etc, have spent a long time on this but keeps failing with non declared function - gif stuff which isn't supported anymore !!!! Thanks Sean ... -- Sean Martin (Apr 20, 2001 13:06:13) Followed instructions to the letter (except using slightly later versions of PHP (4.05) and apache (1.3.20) and get a compiling error when trying to 'make' apache. The PHP compile appears to be dandy, but the apache 'make' starts talking about "undefined reference to 'gdImageCar'" for example. After enough of these the make poops out. Any suggestions? -- Sondra Russell (May 24, 2001 23:08:40) Excellent documentation! Thanks for your hard work! -- David Johnson (Sep 11, 2002 15:12:25) BTW: To answer the last question posed (it took me a while to figure out): You must re-run the configure script for Apache prior to rerunning "make" and "make install." The simplest solution is to run "./configure.status" as it contains all the options you configured with last time. Good luck -- David Johnson (Sep 11, 2002 15:13:18) How about Red Hat 7.3 ? I was install Red Hat 7.3 from CD's and the same time install apache, mysql and php. Now I have to install GD library but not able to find tools to configure php and apache. Any idea ? -- Jari Laaksonen (Nov 7, 2002 07:47:10) First of all thank you for the detailed instructions on installing PHP, Apache, MySQL. I installed Apache, PHP version 4.2.3, MySQL version 3.23.53a and have configured them to run with Apache. Then I tried to install and configure GD with Apache. I downloaded version 1.3 and installed per instructions here. I was able to see gddemo.gif and then started the configuration to add GD support to PHP. I did the "configure" script per instructions on this page. However the "make" is failing. I get errors about many undeclared structures, etc. Errors like: "gdArc undeclared", "gdPie undeclared",... All these errors occurred when the make process reached "Making install in gd". At the end of the make script I got the error messages: "Leaving directory /usr/local/etc/php-4.2.3/ext/gd" **[install-recursive] Error 1 Please let me know what I need to do differently to solve this problem. Thank you ! -- Nikolay Guenov (Dec 1, 2002 11:36:52) http://www.e-gineer.com/instructions...on-linux.phtml  | 
		
  | 
		
 BSD ports :thumbsup 
	 | 
| All times are GMT -7. The time now is 06:34 AM. | 
	Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
	
	©2000-, AI Media Network Inc123