![]() |
[HowTo] PHP5 cgi with bundled gd - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Contributions Area (/forum-40.html) +--- Forum: Howtos (/forum-41.html) +--- Thread: [HowTo] PHP5 cgi with bundled gd (/thread-2079.html) |
[HowTo] PHP5 cgi with bundled gd - hbaes - 01-04-2008 12:03 AM 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,... 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 \ now save the rules file and start the re-building ... PHP Code: ./debian/rules binary 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. RE: [HowTo] PHP5 cgi with bundled gd - raphael - 01-05-2008 03:58 AM And the benefit is...? The php package in Debian doesn't use the bundled library because of security reasons. When a shared library has a security bug and is fixed all the binaries using that library are 'safe'. But if the bundled library code isn't fixed php would still be vulnerable (and let me tell you something, the security team won't fix the bundled one). This is a fix one, save them all v.s. a fix ALL, waste your time situation; of course Debian uses the former approach (others should do too, why aren't the changes in the bundled libgd2 code included by the main libgd2 library?) RE: [HowTo] PHP5 cgi with bundled gd - bjflame - 03-26-2008 02:53 AM hi thanks for this howto. i need functions like imagerotate(). but now i've got one more problem. i did it like its explained, but the gd doesnt support jpg and png. how can i rebuild it that this is enabled? regards RE: [HowTo] PHP5 cgi with bundled gd - Nateside - 07-20-2008 03:56 PM I followed the guide above and it worked great, however, I still don't have any truetype support. What packages should I make sure I have installed, and do I need to change this configuration? RE: [HowTo] PHP5 cgi with bundled gd - hbaes - 07-20-2008 06:08 PM Nateside Wrote:I followed the guide above and it worked great, however, I still don't have any truetype support. What packages should I make sure I have installed, and do I need to change this configuration? you gave him the --enable-gd-native-ttf option ? and also use: --with-ttf you could also have a problem with FreeType 1/2 or T1lib please reckeck Harald RE: [HowTo] PHP5 cgi with bundled gd - hbaes - 07-20-2008 06:10 PM raphael Wrote:And the benefit is...? Hi Raphael, The Benefit ist that the bundled GD Library ist mostly more up to date then the external GD. As the PHP Developers say: PHP Code: Since PHP 4.3 there is a bundled version of the GD lib. RE: [HowTo] PHP5 cgi with bundled gd - Nateside - 07-21-2008 10:43 AM hbaes Wrote:you gave him the --enable-gd-native-ttf option ? Yes, I did give it the "--enable-gd-native-ttf" option under "configure-apache2-stamp: patch-stamp" I also double checked, the same section, and it has "--with-ttf=shared,/usr \" hbaes Wrote:you could also have a problem with FreeType 1/2 or T1lib I ran "apt-get -s install libfreetype6" and " apt-get -s install libt1-5" and got the response "libfreetype6 is already the newest version." and "libt1-5 is already the newest version." I'm new to debian, I switched over from Gentoo as the ispcp install for Gentoo seems to be broken at the moment, but I think I checked this correctly. Also, here are the relevant sections from debian/rules. --Nate Code: configure-cgi-stamp: patch-stamp Code: configure-apache2-stamp: patch-stamp RE: [HowTo] PHP5 cgi with bundled gd - Nateside - 07-21-2008 12:40 PM Not sure if this has anything to do with the problem, but i noticed that in "configure-apache2-stamp: patch-stamp" these two lines don't seem correct... Code: --with-config-file-path=/etc/php5/apache2 \ Code: HOST:~# ls /etc/php5/apache2 also, in the "install: build" section, there is Code: cp debian/libapache-mod-php5.conf \ RE: [HowTo] PHP5 cgi with bundled gd - robbs - 09-15-2008 06:02 AM thanks RE: [HowTo] PHP5 cgi with bundled gd - muruli - 10-03-2008 06:53 PM (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.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? |