faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL : Questions in search of an Answer

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 29 people (66%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do I compile PHP with the FDF toolkit

May 9th, 2000 04:45
Chris Barran, Onno Benschop,


How to Install PHP as an apache module with FDF toolkit enabled 
(UNIX).

	Having successfully completed this installation with some 
difficulty, I thought I would post my notes since I could find very little 
help on the subject.

How to install the FDF toolkit C libraries for Unix

	Get the forms data format libraries from adobe. You need the C 	
libraries for Unix.
	http://partners.adobe.com/asn/developer/acrosdk/forms.html
	These are pre-compiled so there is no work to be done here.
	Unpack the distribution.
	Copy the file fdftk4_05/lib/C/fdftk.h to /usr/local/include/FdfTk.h 
 
	** Watch the case here as PHP expects the capitalisations and 
will 	not find the libraries without them. Either copy the files to the 
new 	name or move them or create a symbolic link.
	
	 Copy the file libfdftk.so for your OS to /usr/local/lib/libFdfTk.so
	
	** Again watch those capitalisations.
 
How to install Apache with a statically linked PHP:

	Unzip and untar the distibution files where you want to install 
them. (X is the version number, I used 12).

		gzip -d  apache_1.3.12.tar.gz 
		tar xvf  apache_1.3.12.tar
    
    Do the same for PHP I used version (3.1.16)

    Change to the apache directory and run the configure command 
	This is a necessary step, see PHP install docs.
	
	    cd apache_1.3.12
		./configure --prefix=/usr/local/apache
    
    Change to the PHP directory
    
	    cd php-3.0
 
 	Run the configure script with the following options.
	
		./configure \
		--with-apache=/PATH/TO/APACHE/SOURCE \
		--with-fdftk
	
		make
		make install

	Change to the Apache directory
	
	Re-run the configure script (Using the apaci install method).
	
		./configure --prefix=/usr/local/apache \ 
		--activate-module=src/modules/php3/libphp3.a \
	    --enable-module={other module} etc
                  
    Now when I got to this stage and ran a make, I got Symbol 
refencing erros when linking the PHP module. These specifically 
referred to the FDF functions. On investigation by my system 
admin this appears to be a bug in the Makefile.tmpl generated by 
PHP. It fails to include a flag telling the compiler to link in the fdf 
libraries.

	In /local/local/etc/src/apache_1.3.12/src edit Makefile add -lFdfTk 
to the definition of LIBS1

	Then run 
		make
		make install
	              
      This worked for us and built an Apache/PHP binary which 
accepts the FDF function calls