On Saturday 30 December 2006 15:09, Mike Kercher wrote:> I'm trying to create pdf's on the fly with php, but I'm getting
errors
> such as:
>
> Fatal error: Call to undefined function: pdf_new()
>
> I tried installing pdflib from dag, but I think I'm missing something
to
> plug it into php.
>
> Has anyone done this?
Simply installing the back end library that PHP uses isn't enough to add
support to PHP for that library. PHP either has to be compiled with support
for it (which you could do by getting the source RPM and modifying the spec
file), finding someone who has already done this for CentOS/RHEL
(http://phprpms.sourceforge.net/, dag, kbsingh) or support needs to be
compiled in later through some other process such as PECL
(http://pecl.php.net). If the all you need is pdflib support and you can't
find it in any of the pubic repos, PECL may be the easiest for you.
http://pecl.php.net/package/pdflib contains the linking functions for pdflib
and PHP. Make sure pdflib is installed, download the PECL package and use
phpize (in php-devel rpm) in the source directory to make it usable for your
php installation.
Note: I actually tried this, and I was getting an error from the PECL pdflib
package about pdflib needing to be at least version 4, even though version 6
(libpdf.so.5?) was installed from Dag's repo. You might have to do a little
groundwork beyond what I outlined to get this to work...
--
- Kevan Benson
- A-1 Networks