Page 1 of 1
php.ini and GD on Linux
Posted: Sun Jan 11, 2004 4:12 pm
by kanshou
Just curious, what else do I have to do to get GD to work on linux besides uncommenting the GD line in the php.ini file?
Posted: Sun Jan 11, 2004 4:18 pm
by qads
um...i am very new to linux...but dont you have to recomplie php or something?

Posted: Sun Jan 11, 2004 4:28 pm
by scorphus
You will have to install php4-gd2 PHP4 module which depends on:
php4-gd - GD module (with GD2) for php4
libc6 - GNU C Library: Shared libraries and Timezone data
libfreetype6 - FreeType 2 font engine, shared library files
libgd2-xpm - GD Graphics Library version 2
libjpeg62 - The Independent JPEG Group's JPEG runtime library
libpng12-0 - PNG library - runtime
t1lib1 - Type 1 font rasterizer library - runtime
xlibs - X Window System client libraries
zlib1g - compression library - runtime
What distro are you running?
Posted: Sun Jan 11, 2004 4:30 pm
by kanshou
Running redhat 7 something. I'm not entirely sure because its not my box, its one of my co-workers. and yah it is gd2 that I will need. Where do I put all these files?
One other thing WAY off topic, I'm looking for a good hosting company that is ~10/mo and gives me about 500MB of space with phpMyAdmin control.
Thanks
Posted: Sun Jan 11, 2004 4:42 pm
by scorphus
I'm not very familiar with Red Hat's package management system (RPM) but I think it can handle dependency between packages and install/upgrade what is necessary.
Posted: Sun Jan 11, 2004 5:35 pm
by kanshou
So that huge list of items was packages that need to be installed to make that GD2 work? Where do I put the GD2 file? Or am I speaking alien right now? ^_^;
Posted: Sun Jan 11, 2004 5:55 pm
by scorphus
1. You need to instal php4-gd PHP module, but it depends on those other packages, therefore you have to install/upgrade them also.
2. The .rpm file internal installation script will copy all necessary files to suitable directories.
Does RedHat run APT? Please, type this command: 'apt-get' and tell us what you get.
Posted: Sun Jan 11, 2004 6:30 pm
by kanshou
Unfortuneately the answer to that post will have to wait until monday mid-morning PST, because the office the box is in is now locked

But I will try what you have suggested. Thanks!
Posted: Sun Jan 11, 2004 6:36 pm
by Pyrite
Actually the only *required* libs for gd2 are libpng and zlib, and jpeg-6b or higher if you want jpeg support.
If you compile php from source, you only need to simply add --enable-gd to the ./configure line.
Posted: Sun Jan 11, 2004 6:40 pm
by scorphus
Ok, I'm looking forward hearing from you. I also hope some other forum user more familiar with RedHat may help us on this matter.
Posted: Sun Jan 11, 2004 6:45 pm
by Pyrite
I agree, I haven't used Redhat since '99. (sorry).
May be the GD website might be of some use just in case:
http://www.boutell.com/gd/
Looks it is so difficult to install the GD module.
Posted: Mon Feb 02, 2004 1:35 am
by Joseph_Han
It has drove me crazy, I will discard, and turn into re-compile the PHP and Apache...
And I am suspecting if it is OK for copying gd.so from another machine.
My way to compile GD modules for PHP in Linux(Redhat)
Posted: Tue Feb 03, 2004 8:36 am
by Joseph_Han
Wish this could help you little, that is my pleasure, because I have suffered from installing these modules and finding these modules from internet.
In this case, I just want to enable gif,jpeg for GD. and I think the compile way(using tar.gz package) is better than using rpm package...
1> where to get these modules
wget
http://www.boutell.com/gd/http/gd-1.8.4.tar.gz
or wget
http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
wget
ftp://ftp.rhyme.com.au/pub/gd/gd-1.8.3gif.tar.gz
or wget
ftp://ftp.rhyme.com.au/pub/gd/gd-2.0.1gif.tar.gz
wget
http://www.libpng.org/pub/png/src/libpng-1.0.15.tar.gz
wget
http://www.gzip.org/zlib/zlib-1.1.4.tar.gz
2>
---------------------------------
1) Install zlib
- tar -zxf zlib.tar.gz
- cd zlib-1.1.3
- ./configure
- make test
- make install
2) Install libjpeg
- tar -zxf jpegsrc.v6b.tar.gz
- cd jpeg-6b
- ./configure
- make
- make test
- make install
- make install-lib
- make install-headers
3) tar xvzf the gif package, and don't touch it, leave the folder there.
---------------------------------------------------------
when complie PHP....
4)./configure --prefix=/usr/local/php --with-apache=sourcefolder --with-gd --with-
gif-dir=sourcefolder --enable-track-vars --with-jpeg-dir=/usr/local --with-zlib-dir=/usr/local/ayae
r/zlib --with-mysql --enable-ftp
5) make, make install.....
Totally, I think if you want to enable png,wbmp,pdf...., juse add the right parameters, but in my sense, where to download the package is the big issue.
Wish this could help you some.. Good Luck!

Joseph Han.
Posted: Sat Feb 28, 2004 4:48 pm
by scorphus
What would I do without you, apt!?!?
$ apt-get update
$ apt-get install php4-gd2
and everything work smooth...
hit
http://www.debian.org,
Scorphus
Posted: Tue Mar 02, 2004 11:11 am
by ol4pr0
you dont need to use $prefix with php.. default of $prefix=/usr/local/lib