How to: pdf-lib 4.0.1 on Debian Etch

This is just a short how to to get pdf-lib 4.0.1 (freeware) working on Debian Etch, without compiling php from source. I’m going to use pear to compile the php – pdf Extension.

1. Install php4 / php5 for apache if you havent done already

# Apache1
apt-get install libapache-mod-php4 libapache-mod-php4
# Apache2
apt-get install libapache2-mod-php4 libapache2-mod-php4

4. Get php-pear and php4-dev / php5-dev since you will need them to compile the pdf.so extension for php.

apt-get install php4-dev php5-dev php4-pear php5-pear
pear install pdflib --with-pdflib=/usr/local
# ..... uild process completed successfully Installing 'pdf.so' at ext_dir (/usr/lib/php4/20020429/pdf.so)
install ok: pdflib 2.1.3 # .....

5. If everything works out well go a head and add the php-extension to your php.ini

# Etch
echo "extension=pdf.so" >> /etc/php4/conf.d/pdf_lib.ini
echo "extension=pdf.so" >> /etc/php5/conf.d/pdf_lib.ini
# Sarge use the default php.ini and dont forget the apache2/php.ini

6. Test and Restart your apache

apache2ctl configtest
Syntax OK
apache2ctl restart

7. phpinfo() should now show:

PDF Support => enabled
PDFlib GmbH Version => 4.0.1
Revision => $Revision: 1.8 $ Pdflib 4.0.1 - installation ok
Bookmark and Share

Leave a Reply