[Hopefully you can follow my instructions. I find these things much easier to do myself than to explain, but I'll try to lay everything out step by step for you.]
You really should install your own custom PHP in order to use PDFlib, and thanks to the Dreamhost wiki, doing that is pretty simple. It's mostly copy and paste.
http://wiki.dreamhost.com/index.php/Installing_PHP5
Follow the directions carefully, using the first installation script they link to. Change line 4 to have your domain name, making sure it's the same domain name as listed in your home directory. For example, if your domain is listed as DOMAIN.COM instead of WWW.DOMAIN.COM, make sure you use DOMAIN.COM on line 4. Execute the script from your home directory, not from your domain directory.
It's going to take a while to build, so go find something interesting to do while you're waiting. Be sure to follow the instructions in the wiki about modifying your .htaccess file.
When it's done, confirm that under the domain you installed to you see a cgi-bin folder with the file php.cgi inside. If not, you probably made a typo on line 4 of your install script. In that case, go back to your home directory and look for a new folder with your mistyped domainname. Copy the cgi-bin to your domain directory and make sure you copy the php.cgi that's in it as well.
Back in your home directory again, do the following:
wget http://www.pdflib.com/binaries/PDFlib/700/PDFlib-7.0.0p3-Linux-php.tar.gz
tar -xvvzf PDFlib-7.0.0p3-Linux-php.tar.gz
Now, go to your domain's cgi-bin directory and do this:
cp ../../PDFlib-7.0.0p3-Linux-php/bind/php5/php-520/libpdf_php.so ./
Now copy your php.ini to cgi-bin:
cp ../../php5/etc/php5/DomainNameYouUsedInLine4/php.ini ./
Now edit php.ini. I usually use pico just because that's what I'm used to.
pico php.ini
Ctrl-W to find extension_dir
Make sure extension_dir = "./"
Now, add a line:
extension=libpdf_php.so
Ctrl-O to Save
Ctrl-X to Exit
Now... you're done! To make sure everything worked, put the following script into a test file:
<?php phpinfo(); ?>
Save it to something like test.php, then load it up in your web browser. If it worked, you should be able to scroll down and see:
PDF Support enabled
PDFlib GmbH Binary-Version 7.0.0p3
PECL Version 2.1.0
Revision $Revision: 1.5 $
Any questions or problems, e-mail me at michael@furthervoyages.com.
Cheers,
Michael