#1 (permalink)  
Old 05-01-2006, 01:53 PM
Registered User
 
Join Date: Oct 2005
Location: Long Island, NY
Posts: 23
MZmuda is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-19-2006, 02:35 PM
Registered User
 
Join Date: May 2004
Posts: 10
cdick@ocis.net
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-19-2006, 04:08 PM
Registered User
 
Join Date: Jan 2005
Posts: 1,879
webignition is on a distinguished road
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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-19-2006, 04:10 PM
Registered User
 
Join Date: Jan 2005
Posts: 1,879
webignition is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc