Current time: 04-25-2024, 11:10 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] PHP5 cgi with bundled gd
Author Message
hbaes Offline
Junior Member
*

Posts: 23
Joined: Nov 2007
Reputation: 0
Post: #1
[HowTo] PHP5 cgi with bundled gd
In this short HowTo I will describe how You can rebuild the php5-cgi to use the php5-bundled gd library on debian etch.

This point is sometimes necessary if you or your application will use some special gd functions missing in the libgd but be part of the php5-gd. (i.e. imagefilter() or imagerotate() will be missing if you use the original debian etch php5-cgi)

firrst of all:
PHP Code:
apt get update 
PHP Code:
apt get upgrade 

change to the source directory
PHP Code:
cd /usr/src 

download the source for php5 from debian
PHP Code:
apt-get source php5-cgi 

download some other stuff for re-building the package:
PHP Code:
apt-get build-dep php5-cgi 

after that change to the new extract of php5-5*
when i write this the current version is php5-5.2.0:
PHP Code:
cd php5-5.2.0 

now edit the debian configuration:
PHP Code:
vi debian/rules 

change every line from
PHP Code:
--with-gd=shared,... 
to
PHP Code:
--with-gd 

in the section configure-cgi-stamp: patch-stamp add the following lines: (I didi it after the $(COMMON_CONFIG) line)
Quote:--with-jpeg-dir=shared,/usr \
--with-gd \
--enable-gd-native-ttf \

now save the rules file and start the re-building ...
PHP Code:
./debian/rules binary 
after a cuple of time change back to the source the directory
and you will see a couple of new .deb files.

PHP Code:
cd .. 

now install the new cgi binary
PHP Code:
dpkg -i php5-cgi_5.2.0-8+etch11_i386.deb 

after all restart apache ...
PHP Code:
/etc/init.d/apache2 restart 

thats all

Harald

Edit: Updated to the last Version, JPEG Support 4 GD enabled.
(This post was last modified: 06-10-2008 07:33 PM by hbaes.)
01-04-2008 12:03 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
[HowTo] PHP5 cgi with bundled gd - hbaes - 01-04-2008 12:03 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)