While in the process of maintaining my dedicated server, I ran into a bit of a ‘bump’ so to say. It all started when after I updated to PHP 5.2.1. I recieved an email from one of the people I host, asking why he had a 5MB error_log file.
He supplied me with the contents of the log file, which were:
[11-Mar-2007 17:00:45] PHP Warning: PHP Startup: pdf: Unable to initialize moduleModule compiled with module API=20050922, debug=0, thread-safety=0PHP compiled with module API=20060613, debug=0, thread-safety=0These options need to matchin Unknown on line 0
Knowing that I had installed a PECL module for PDFLib, I assumed that it was it, I was right. I had previously went through a ton of hoops to get this to work. Here is how I fixed the error message above and how I got mine working. I would like to note that I am not a Linux expert.
I used PDFLib Lite, for free, non-commercial use. http://www.pdflib.com/download/pdflib-family/pdflib-lite/
You need to be root/sudo while doing this and PEAR/PECL needs to be installed.
wget http://www.pdflib.com/binaries/PDFlib/701/PDFlib-Lite-7.0.1.tar.gz
tar xzvf PDFlib-Lite-7.0.1.tar.gz
cd PDFlib-Lite-7.0.1
./configure --prefix=/usr
make
make install
pecl install pdflib (will ask for installation directory, type: /usr/)
You should recieve a string similar to this:
"Build process completed successfully
Installing '/var/tmp/pear-build-root/install-pdflib-2.1.2//usr/local/lib/php/ext ensions/no-debug-non-zts-20050922/pdf.so'"
What I did next, was copy the pdf.so file into my php extensions directory:
cp /usr/local/lib/php/extensions/no-debug-<tab>/pdf.so /usr/include/php/ext
I then modified my php.ini file, to load the pdflib, by adding the following line to the extensions section:
extension=pdf.so
I hope this helps some of those that got this error. There isn’t much help out there on this error, that I could find on google, that is why I decided to post it in my blog.