Click to See Complete Forum and Search --> : PHP4 complie problem with PDFLIB


w3si1
03-22-2001, 09:01 AM
Tried most notes from most forrum's but have yet to solve a problem compiling in PDFLIB support in PHP4. My problem:

RedHat 6.0
PHP4.0.4pl1
PDFLIB-3.03

Compiled PDFLIB --enable-shared-pdflib
Results in /usr/local/lib
libpdf.a
libpdf.la
libpdf.so
libpdf.so.0
libpdf.s0.0.1.1
I also copied pdflib.h into a dir /usr/local/include
I also added /usr/local/lib to /etc/ld.so.conf and
ran ldconfig

Compiled PHP --with-pdflib=/usr
(Also compiled a 2nd time --with-pdflib=/usr/local/lib)


PHP compiled but log says:
Checking whether to include Pdflib 3.x support - no

Any help would be appreciated..

dannyboy
03-26-2001, 02:45 PM
I think you want --with-pdflib=/usr/local

When you say /usr/local the makefile knows that the header (.h) file will be in /usr/local/include and the lib file in /usr/local/lib

w3si1
03-27-2001, 11:56 AM
Thanks Dan, I thought I'd tried that path before, now ./configure recognizes that I wish to include PDFlib, however I get another config error, which I have seen in other RFI's but i have not been able to overcome:

checking for PDF_show_boxed_in -lpdf...no
configure:error: pdflib extension requires pdflib 3.x

Previously, I had deliniated the libs created in /usr/local/lib.

PS: this is bare-bones PDFlib, no TIFF,png etc.

Help..

dannyboy
03-27-2001, 03:11 PM
Steve wrote:
-------------------------------
Thanks Dan, I thought I'd tried that path before, now ./configure recognizes that I wish to include PDFlib, however I get another config error, which I have seen in other RFI's but i have not been able to overcome:

checking for PDF_show_boxed_in -lpdf...no
configure:error: pdflib extension requires pdflib 3.x

Previously, I had deliniated the libs created in /usr/local/lib.

PS: this is bare-bones PDFlib, no TIFF,png etc.

Help..

OK, Try this. In the pdflib source tree there is a dir named ext/php Copy these files to the php src tree under ext/pdf

Now you will have to rerun ./configure for php and this will hopefully get the libs in sync. I am running php404pl1 and pdflib 40beta2 on freebsd 4.2-RELEASE. I will be backing down to pdflib 3 as I do not need the new features in the beta and I want to run the release version of the code, so after I make that switch I may have more hints.

w3si1
03-28-2001, 08:04 AM
I'm sorry - there is a ext/pdf lib in php source tree, but no ext/php in pdflib source tree. The only two that may have what we are looking for are /bind and /pdflib dirs under the pdf source tree.

Any other suggestions..

Still stuck.

dannyboy
03-28-2001, 01:39 PM
Steve Ludeman wrote:
-------------------------------
I'm sorry - there is a ext/pdf lib in php source tree, but no ext/php in pdflib source tree. The only two that may have what we are looking for are /bind and /pdflib dirs under the pdf source tree.

Any other suggestions..

Still stuck.

Sorry! You found the correct files, copy the bind/php files from pdflib to the php ext/pdf dir. This is the connection between php and pdflib. From what I have read as of php 4.05 (coming soon) the files will be in sync.

w3si1
03-29-2001, 01:28 PM
Copied the /bind/c files from pdf dir to php ext/pdf dir. No luck same message. Tried a number of other copies (from pdflib) to php but still no luck. Put some display's in ./configure (php)script and determined that the configure is looking in /usr/local/lib (where the PDFlib install libs ended up) prior to echo of message PDF_show_boxed_in and subsequent fail of the compile.

After looking at the pdflib.so module (hex edit), I have concluded that an entry point (PDF_show_boxed_in) is missing in the PDFlib load module. Based on my limited knowledge of PDFlib, I am guessing that it has not been compiled correctly, and that I should compile it with tiff and jpeg support (per some other posts). That will be my next move in this journey unless you or anyone has furter suggestions. I expect to see that entry point show-up if i'm right.

dannyboy
03-29-2001, 02:15 PM
I reinstalled everything last night on my FreeBSD box so that I could backdown from pdflib4Beta to pdflib303. Here is what I did:

1) compile pdflib303

2) download pdflib4Beta and copy the pdflib-4.0.0beta2/bind/php/ext/pdf dir to php404p1/ext/pdf

3) configure php4:

./configure --with-apxs=/usr/local/sbin/apxs
--with-config-file-path=/usr/local/etc
--with-jpeg-dir=/usr/local
--with-tiff-dir=/usr/local
--with-mysql=/usr/local
--with-pdflib=/usr/local
--with-gd=/usr/local
--with-ttf=/usr/local
--with-system-regex
--enable-versioning
--enable-track-vars
--prefix=/usr/local
--disable-debug
--disable-pear
--enable-ftp
--with-zlib
i386--freebsd4.2

And it works. If you look in the pdflib4beta source dir pdflib-4.0.0beta2/bind/php you will find some test php files and a readme.txt file describing some of the above, it does not mention that the files can be used for pdflib303, but that is how I am using them. I suspect that I would get errors if I tried some of the functions supported by pdflib4 and not pdflib303, but I am sticking with basic stuff.

I hope this helps, if not I can send you a freebsd cd :)

dannyboy
03-29-2001, 02:33 PM
Here are some urls to look at. They might help more with Linux specific problems?

http://rpmfind.net/linux/RPM/falsehope/home/gomez/php/php-pdflib-4.0.3pl1-3.i386.html

http://www.delouw.ch/linux/apache.phtml

http://www.google.com/linux?site=search&restrict=linux&hl=en&lr=lang_en&newwindow=1&safe=off&q=php4+pdflib