Installing PDFLib on PHP 5

PDFlib was removed awhile back for PHP5 because the newer versions have different licenses and we wanted to avoid any possible problems. The PHP4 version is still old so it's available in EasyApache, but of course I don't recommend PHP4 since it's not supported by the PHP developers anymore.

So if you want to install it, it will have to be outside of EasyApache. Here's how you could do it:

# wget http://www.pdflib.com/binaries/PDFlib/704/PDFlib-Lite-7.0.4p4.tar.gz
# tar -zxvf PDFlib-Lite-7.0.4p4.tar.gz
# cd PDFlib-Lite-7.0.4p4
# ./configure --without-java
# make && make install

Then build PHP with pdflib support.

# echo '--with-pdflib' >> '/var/cpanel/easy/apache/rawopts/all_php5'
# /scripts/easyapache --build

Finally, make sure pdflib is enabled as an extension in php.ini; add:

extension=pdf.so

to /usr/local/lib/php.ini and restart apache. Then it will show up. I have already done this for you as a courtesy

Thats it EnjoyWink

    3 comments:

  1. sanooj manangat said... January 8, 2010 at 1:16 PM

    Thanks aloat....

  2. Thanks a lot! This is really helpfull

  3. Not showing up in php -m output after I did everything.