php.ini and GD on Linux
Moderator: General Moderators
php.ini and GD on Linux
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?
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
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?
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?
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
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
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
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.
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.
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
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/
May be the GD website might be of some use just in case:
http://www.boutell.com/gd/
-
Joseph_Han
- Forum Newbie
- Posts: 2
- Joined: Mon Feb 02, 2004 1:35 am
- Location: Beijing China
Looks it is so difficult to install the GD module.
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.
And I am suspecting if it is OK for copying gd.so from another machine.
-
Joseph_Han
- Forum Newbie
- Posts: 2
- Joined: Mon Feb 02, 2004 1:35 am
- Location: Beijing China
My way to compile GD modules for PHP in Linux(Redhat)
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.
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!
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
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
$ apt-get update
$ apt-get install php4-gd2
and everything work smooth...
hit http://www.debian.org,
Scorphus