pdflib

snaaps

Verified User
Joined
Jan 29, 2005
Messages
226
Location
Netherlands
Can anywone help me with a how to for installing pdflib?
I search on internet but found not a good working how to.

I Am using a Fedora core 3 server.
 
Did it once for one server as a test on Red Hat 8, don't know if it's changed, isn't all that difficult.

If you're interested, contact me at sebastian _at_ sebsoft.nl.

I guess it ain't much more than downloading the lib, installing it and adding it to the right place on the configure.php file in the custombuilder.
 
Ok, I tried to install pdflib-lite but it wont work!

# cd /root/downloads

Download pdflib lite:
# wget http://www.pdflib.com/products/pdfli...e-6.0.3.tar.gz

unzip tar:
# tar -xvzf PDFlib-Lite-6.0.3.tar.gz

delete tar file:
# rm -f PDFlib-Lite-6.0.3.tar.gz

go to the unzipped filles:
# cd PDFlib-Lite-6.0.3

install PDFlib:
# ./configure --enable-shared-pdflib
# make
# make install

edit ./configuration.php
# nano -w /usr/local/directadmin/customapache/configure.php

add rulls:
--with-pdf

Rebuild PHP:
# cd /usr/local/directadmin/customapache
# ./build clean
# ./build php

Restart Apache
# service httpd restart

But when i ask a php file i get this error:
Fatal error: Call to undefined function: pdf_new() in /home/ccchosti/domains/ccc00.nl/public_html/pdfclock.php on line 10

I also tried to add the next rule to the configuration.php file
--with-pdf-dir=/usr/local/lib

But it also not work for me.

Whats going rong here?
 
The method how you're trying to install it is no longer supported, it appears.

The main method now is, compile & install the binary, than install a pear pecl thingy that will make the lib php compatible and as final step add it to the php.ini and restart httpd.

From step 1 to working on my php 5.1.2 test install:
Code:
cd /usr/src
wget [url]http://www.pdflib.com/products/pdflib/download/603src/PDFlib-Lite-6.[/url]
0.3.tar.gz
tar xzvf PDFlib-Lite-6.0.3.tar.gz
cd PDFlib-Lite-6.0.3
./configure --prefix=/usr/local
make
make install
pear install pecl/pdflib
Enter /usr/local as location where it should seek.
Now, the pecl installer will give you a nice location where a pdf.so will reside.
Here it said:
Code:
Installing '/var/tmp/pear-build-sebsoft/install-pdflib-2.0.5//usr/local/l
ib/php/extensions/no-debug-non-zts-20050922/pdf.so'
Which made the lib be at:
Code:
/usr/local/lib/php/extensions/no-debug-non-zts-20050922/pdf.so
So, I opened up the right php.ini, and added:
Code:
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20050922/pdf.so
After which I restarted the httpd process.

After that, it worked :).

I do prefer the old (now unsupported) method, I don't know what will happen on php upgrade now :(.
 
Any idea of what to do when this occurs?

pear install pecl/pdflib
downloading pdflib-2.1.3.tgz ...
Starting to download pdflib-2.1.3.tgz (55,675 bytes)
.............done: 55,675 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20050606
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

ERROR: `phpize' failed
 
Any idea of what to do when this occurs?

pear install pecl/pdflib
downloading pdflib-2.1.3.tgz ...
Starting to download pdflib-2.1.3.tgz (55,675 bytes)
.............done: 55,675 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20050606
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

ERROR: `phpize' failed

yum install autoconf

This should do the job for you!
 
I hope BigWil found the answer before 2 years and 8 months had gone by.
 
Nevertheless, it's helpful to other people who need to do the same.

Jeff
 
Back
Top