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

    4 days later

    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

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

        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.

          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.

            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.

              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.

                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 🙂

                  Write a Reply...