PDF Lib install fail on linux server. Using pecl install pdflib

别说谁变了你拦得住时间么 提交于 2019-11-29 02:35:02

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!