Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2005
    Location
    Long Island, NY
    Posts
    23

    Default 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

  2. #2
    Member
    Join Date
    May 2004
    Posts
    10

    Default 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.

  3. #3
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by cdick@ocis.net
    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.
    Take a peek at my previous reply.

    [edit]A timewarp played havoc there. The reply to which I refer is below not above this one.[/edit]

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by MZmuda
    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 ...
    Looks like you're using the PHP4 style function-oriented method (as opposed to the PHP5 object-oriented method).

    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().
    If you're just using pdf_begin_document() without preparing things first, it's probably not going to work.

    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.

Similar Threads & Tags
Similar threads

  1. CPanel, PHP and PDFlib
    By xvihost in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-19-2010, 11:25 AM
  2. Problem: compile php with PDFLIB and PHP 5.1.6
    By CoolMike in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 09-08-2007, 06:32 AM
  3. easyapache php 4.4.2 & PDFLib
    By nickp666 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-28-2006, 07:31 AM
  4. PDFlib, PHP, Apache
    By bigpy2003 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-06-2005, 05:42 PM
  5. pdflib for php
    By ialex03 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-29-2004, 01:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube