|
|||
|
PHP, PDFs, and pdflib
Can anyone tell me exactly what the WHM-->Software-->Apache Update / Option: PHP Module (Version 4.3.3) -->PDFlib does?
I thought it installs the PDF functionality into PHP via the PDFlib lite module with '--with-pdflib' When I do a phpinfo command, I get the following in the "header": Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pdflib' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' Registered PHP Streams php, http, ftp, compress.zlib I also get the following in the Configuration area: PDF: PDF Support enabled PDFlib GmbH Version 5.0.3 Revision $Revision: 1.112.2.11 $ This suggests to me that pdflib is installed and recognized by php, BUT... when I do a pdf_begin_document(), (as copied / pasted from the PHP.net PDF example area) I get the following error: Fatal error: Call to undefined function: pdf_begin_document() in ... So, 2 questions: 1) How do I add PDF support into PHP 2) Am I doing something wrong? Is PDF support installed, and something else is going awry?) Thanks in advance. - Mike Z |
|
|||
|
Same problem here
Hi there,
Did you ever find a solution for this? I found the exact same thing, I was able to select PDFLib from the easyapache build in the PHP section. My phpinfo output now shows that PHP (4.4.2) is built "--with-pdflib" but I get the same Call to undefined function: pdf_begin_document() when I try to run the hello world example. Before recompiling Apache (with PHP having --with-pdflib), I was getting a different error: Call to undefined function: pdf_new() Thanks in advance for any advice or solutions. |
|
|||
|
Quote:
[edit]A timewarp played havoc there. The reply to which I refer is below not above this one.[/edit] |
|
|||
|
Quote:
Have you followed the method on php.net precisely? Code:
In PHP 4, first a PDF resource has to be retrieved with a function call like $p = PDF_new(). Take a glance through the manual again. Copy and paste the entire example and run it to first get a feel for how it works. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|