If you install directly from within WHM, you will have errors, either
Code:
| configure: error: pdflib.h not found! |
or
Code:
| PDFlib extension requires at least pdflib 4.0.x. |
| See config.log for more information. |
That’s because you haven’t got pdflib-lite installed yet.
If you have a rpm based Linux system, you can download pdflib-lite here
http://pkgs.org/download/centos-5-rhel-5/remi-x86_64/pdflib-lite-7.0.5-1.el5.remi.x86_64.rpm.html
and you also need pdflib-lite-devel
To compile the code, you of course need automake, c etc..
Next download pdflib
Code:
After you got it, run the following
Code:
| tar -xvzf pdflib-2.1.8.tgz |
| cd pdflib-2.1.8 |
| phpize |
| ./configure |
| ./make |
| ./make install |
If you don’t have phpize (you would have phpize command not found error), you need to install php-devel package
finally, open /usr/local/lib/php.ini and add one line
Code:
If you have a plain Centos server, you need to create a new file at /etc/php.d/pdf.ini
and add a single line
Code:
Don’t forge to restart httpd
in cpanel, run
/scripts/restartsrv_httpd
In plain Centos, run
/sbin/service restart httpd
To test it, create a file called test.php and input one line
PHP:
now run this test.php in your browser, you should see the pdflib exntension