Current time: 05-05-2024, 04:13 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] PHP5 cgi with bundled gd
Author Message
muruli Offline


Posts: 1
Joined: Oct 2008
Reputation: 0
Post: #10
RE: [HowTo] PHP5 cgi with bundled gd
(01-04-2008 12:03 AM)hbaes Wrote:  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.
HI Harald,
i did all the steps mentioned but when i typed this
./debian/rules binary
i got error ie undefined refernce to pcre_exec . what to do now?
10-03-2008 06:53 PM
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
RE: [HowTo] PHP5 cgi with bundled gd - muruli - 10-03-2008 06:53 PM

Forum Jump:


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