正文  软件开发 > PHP编程技术 >

Linux环境下安装XAMPP的PHP的PDF扩展,xampppdf

Linux环境下安装XAMPP的PHP的PDF扩展,xampppdf安装pdf扩展1. wget http://pecl.php.net/get/pdflib-4.1.2.tgz2. tar zx...

Linux环境下安装XAMPP的PHP的PDF扩展,xampppdf

安装pdf扩展
1. wget http://pecl.php.net/get/pdflib-4.1.2.tgz
2. tar zxvf pdflib-4.1.2.tgz
3. cd pdflib-4.1.2.tgz
4. /opt/lampp/bin/phpize
5. ./configure --with-php-config=/opt/lampp/bin/php-config
6. make && make install
7. vim /opt/lampp/etc/php.ini 添加extension="pdf.so"
8. 重启XAMPP:/opt/lampp/xampp restart

如果报错信息是:Warning: PHP Startup: Unable to load dynamic library ‘/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/pdf.so‘ - libpdf.so.6: cannot open shared object file: No such file or directory in Unknown on line 0

解决方法是:cp /usr/local/lib/libpdf.so.6 /usr/local/lib64/
说明编译好的64位库没有安装到/usr/local/lib64/目录下

或修改第5步骤:./configure --with-php-config=/opt/lampp/bin/php-config --libdir=/usr/local/lib64/

http://www.bkjia.com/PHPjc/1226186.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1226186.htmlTechArticleLinux环境下安装XAMPP的PHP的PDF扩展,xampppdf 安装pdf扩展 1. wget http://pecl.php.net/get/pdflib-4.1.2.tgz 2. tar zxvf pdflib-4.1.2.tgz 3. cd pdflib-4.1.2.tgz 4. /opt/...