For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > August 2006 > PHP5 with PDFlib









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP5 with PDFlib
Miguel Cruz

2006-08-02, 6:57 pm

I'm curious - has anyone managed to get this to work?

I am trying to use PHP 5.1.4 with PDFlib Lite 6.0.3.

On both Linux and Mac, pear won't build it and tells me I have to use
pecl. Pecl goes through the build process, builds a pdf.so, fails to
copy it to the extensions/blahblah directory, and then adds it to the
list of installed extensions (which is incorrect; the install never
completed successfully).

At the moment I'm working on the Mac, where I've used softlink hijinks
to grab a copy of the pdf.so file before pecl deletes it, and installed
it manually in the extensions directory.

When I do this, the PHP CLI is able to use PDF functions. However,
Apache won't start - it dies with a bus error (if I comment the pdf.so
line out from php.ini, it works fine).

Par for the course? Anyone having better luck? What was the trick to get
it to work with OSX? Did you have to build your own Apache?

miguel
--
Photos from 40 countries on 5 continents: http://travel.u.nu
Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
Airports of the world: http://airport.u.nu
Andreas Kletsch

2006-08-02, 6:57 pm

"Miguel Cruz" <spam@admin.u.nu> schrieb im Newsbeitrag
news:spam-E19290.04171703082006@localhost...
> I'm curious - has anyone managed to get this to work?
>
> I am trying to use PHP 5.1.4 with PDFlib Lite 6.0.3.
>
> On both Linux and Mac, pear won't build it and tells me I have to use
> pecl. Pecl goes through the build process, builds a pdf.so, fails to
> copy it to the extensions/blahblah directory, and then adds it to the
> list of installed extensions (which is incorrect; the install never
> completed successfully).
>
> At the moment I'm working on the Mac, where I've used softlink hijinks
> to grab a copy of the pdf.so file before pecl deletes it, and installed
> it manually in the extensions directory.
>
> When I do this, the PHP CLI is able to use PDF functions. However,
> apache won't start - it dies with a bus error (if I comment the pdf.so
> line out from php.ini, it works fine).
>
> Par for the course? Anyone having better luck? What was the trick to get
> it to work with OSX? Did you have to build your own Apache?
>
> miguel
> --
> Photos from 40 countries on 5 continents: http://travel.u.nu
> Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
> Airports of the world: http://airport.u.nu


Hi Miguel,
why use PDFLib ?
Have you thought about using FPDF ( http://www.fpdf.org) ?
FPDF is FREE and doesn't rely on any PHP-Extension - just pure PHP-Code.

Perhaps you give it a try..
So long
Andreas


Miguel Cruz

2006-08-02, 6:57 pm

"Andreas Kletsch" <a.kletsch@arcor.de> wrote:
> why use PDFLib ?
> Have you thought about using FPDF ( http://www.fpdf.org) ?
> FPDF is FREE and doesn't rely on any PHP-Extension - just pure PHP-Code.


Unfortunately I have huge amounts of pre-existing code that depends on
PDFlib...

And of course, as soon as I post about my frustration getting it to
work, I stumble on the solution. Turns out Darwinports left the module
lines for both php4 and php5 in httpd.conf, which was causing a symbol
conflict. Commented out the php4 lines and now I'm makin' PDFs.

miguel
--
Photos from 40 countries on 5 continents: http://travel.u.nu
Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
Airports of the world: http://airport.u.nu
oy

2006-08-30, 6:57 pm


Hi Miguel,

I am trying to build PDFlib Lite 6.0.3 to use with PHP 5.1.4 on Linux,
too. But I could not get PECL working. Pear is installed but i am new
to PECL and PEAR. Could you please tell how to build the pdf.so using
PECL?


Miguel Cruz wrote:
> I'm curious - has anyone managed to get this to work?
>
> I am trying to use PHP 5.1.4 with PDFlib Lite 6.0.3.
>
> On both Linux and Mac, pear won't build it and tells me I have to use
> pecl. Pecl goes through the build process, builds a pdf.so, fails to
> copy it to the extensions/blahblah directory, and then adds it to the
> list of installed extensions (which is incorrect; the install never
> completed successfully).
>
> At the moment I'm working on the Mac, where I've used softlink hijinks
> to grab a copy of the pdf.so file before pecl deletes it, and installed
> it manually in the extensions directory.
>
> When I do this, the PHP CLI is able to use PDF functions. However,
> apache won't start - it dies with a bus error (if I comment the pdf.so
> line out from php.ini, it works fine).
>
> Par for the course? Anyone having better luck? What was the trick to get
> it to work with OSX? Did you have to build your own Apache?
>
> miguel
> --
> Photos from 40 countries on 5 continents: http://travel.u.nu
> Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
> Airports of the world: http://airport.u.nu


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com