I'm attempting to install pdflib on my server and receiving the error:
configure: error: pdflib.h not found! Check the path passed to --with-pdflib=<PATH>. PATH should be the install prefix directory.
ERROR: /root/tmp/pear/pdflib/configure --with-pdflib=/usr/local' failed
I am entering the following in terminal:
pecl install pdflib
path to pdflib installation? :
/usr/local
I got it solved this way: Downloaded latest http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz
# cd /home/xxx/Downloads/
# wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz
Un-tar-gzip it
# tar xzf PDFlib-Lite-7.0.5p3.tar.gz
# cd PDFlib-Lite-7.0.5p3
See, if and where it contains pdflib.h
# find . -name 'pdflib.h'
./PDFlib-Lite-7.0.5p3/libs/pdflib/pdflib.h
Install via pecl
# pecl install pdflib
If it asks for path, enter the same full path /home/xxx/Downloads/pdf/PDFlib-Lite-7.0.5p3/libs/pdflib See from installation messages, if and where it added file pdf.so (in php extensions directory, this dir name may vary but file pdf.so has to exist):
# ls -la /usr/lib/php5/20090626
change pdf.ini
# nano /etc/php5/apache2/php.ini
adding at the end
extension=pdf.so
(You may want to add it in command line php conf /etc/php5/cli/php.ini too)
reload apache
# service apache2 reload
See, if this extension appears
for Apache see output of phpinfo() function if there is something new regarding PDFlib PDFlib PDFlib Support enabled PDFlib GmbH Binary-Version 7.0.5p3 PECL Version 3.0.0 Revision $Revision: 1.80.2.2 $
for command line
enter at prompt
# php -i |grep PDF
PDFlib
PDFlib Support => enabled
PDFlib GmbH Binary-Version => 7.0.5p3