I've been trying to get PHP 4.0.6 and pdflib 4.0.1 working. However, I can't seem to get libpdf_php.so built. I've been trying to get it built using ./configure --with-pdflib and from within the pdflib build, but neither has worked. Any help would be appreciated.

    Did you try pointing the --with-pdflib configure option to where the pdflib libs and includes are?

    {Just an example.)

    ./configure --with-pdflib=/usr

    Also, if you wanted it to be built as an extension, shouldn't you use 'shared'?

    (Again, just an example.)

    ./configure --with-pdflib=shared,/usr

    I've never used pdflib now, I'm just guessing.

    adam

      RedHat 6.x
      pdflib 4.0.1
      php 4.0.6

      I had the same problem. I did it this way...

      in /usr/local/src
      tar xzf pdflib-4.0.1.tar.gz
      tar xzf php-4.0.6.tar.gz

      cd pdflib-4.0.1

      ./configure --enable-shared-pdflib --enable-php

      make

      make install

      remove links /usr/local/lib/libpdf.so.1 & /usr/local/lib/libpdf.so
      and any links to libpdf files from /usr/lib

      rename /usr/local/lib/libpdf.so.1.1.1 to /usr/local/lib/libpdf.so.1
      then also copy this file to /usr/local/lib/libpdf.so
      then copy all the files in /usr/local/lib to /usr/lib

      copy dir and contents /usr/local/src/pdflib-4.0.1/bind/php/ext/pdf to
      /usr/local/src/php-4.0.6/ext/pdf

      cd /usr/local/src/php-4.0.6

      ./configure \
      --prefix=/usr/local/php \
      --with-config-file-path=/usr/local/php \
      --with-apxs=/usr/sbin/apxs \
      --with-jpeg-dir=/usr/lib \
      --with-tiff-dir=/usr/lib \
      --with-pdflib \
      --enable-track-vars \
      --enable-magic-quotes \
      --enable-debugger

      make

      shutdown apache here

      make install

      cp /usr/local/src/php-4.0.6/php.ini-optimized /usr/local/php/php.ini

      edit php.ini as follows;

      magic_quotes_gpc=On
      register_globals=On
      extension=libpdf.so

      then restart apache

      Bit of a carry on I know but it worked for me. The easiest way to check if it has worked is to look at a webpage only containing <? phpinfo() ?>

        Write a Reply...