28 January 2010

Recompiling PHP5 to get imagerotate() and other functions on Debian

Posted by Matthieu under: Miscellaneous

I mostly followed directions from this page with different directory names and I was able to get PHP5 to use the bundled GD library on Debian (lenny).

cd /usr/src/
apt-get source php5
apt-get build-dep php5
cd php5-5.2.6.dfsg.1/
nano debian/rules
(replace '--with-gd=shared,/usr --enable-gd-native-ttf \' with '--with-gd=shared --enable-gd-native-ttf \')
dpkg-buildpackage -rfakeroot
cd ..
dpkg -i *.deb
/etc/init.d/apache2 restart

One Comment so far...

Cedric P. Says:

3 May 2010 at 10:47.

I just wanted to get news and here is what i get…
“(replace ‘–with-gd=shared,/usr –enable-gd-native-ttf \’ with ‘–with-gd=shared –enable-gd-native-ttf \’)”

I think i have to find the proper section ;-)

Leave a Reply