ID: 26118
Updated by: [EMAIL PROTECTED]
Reported By: admin at evodot dot de
-Status: Open
+Status: Feedback
Bug Type: FDF related
Operating System: debian linux 3.0
PHP Version: 4.3.3
New Comment:
Try this
fdf_create() or die(fdf_error(fdf_errno()));
That hopefully will return a human readable error from the fdf library
telling you when the fdf_create() function failed.
Previous Comments:
------------------------------------------------------------------------
[2003-11-04 11:45:05] admin at evodot dot de
Description:
------------
On a debian linux 3.0 with all-standard packages the phplib
is to be substituted by a self-compiled one incl. fdf-support.
Got the sources of php 4.3.3 and FdfTk v5.0 and compiled
without severe problems (only some develop-packages, which
had to be added).
But of the fdf-functions is actually available, i.e. any
of 'fdf_open( $file )', 'fdf_open_string( "$HTTP_FDF_DATA" )'
or even 'fdf_create()' fails without any further comment.
In the log you can only find the complaints of
'fdf_close()', 'fdf_save()' and so on ...
Btw. I tried both, fdf as shared object and statical linked
into php:
./configure --prefix=/usr/local --with-exec-dir=/usr/local/lib/php
--with-pgsql=no --with-mysql=shared,/usr --with-gd=shared,/usr
--with-tiff-dir=shared,/usr --with-jpeg-dir=shared,/usr
--with-png-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6
--with-pdflib=no
--with-imap=no --with-ldap=no --with-zlib=yes --with-xml --with-ttf
--with-sablot --with-readline --with-ftp --with-gettext=no --with-mm
--with-freetype-dir=shared,/usr --enable-versioning --enable-yp=no
--enable-bcmath --enable-trans-sid --enable-inline-optimization
--enable-track-vars --enable-magic-quotes --enable-safe-mode
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-shmop
--enable-exif --enable-ftp --enable-memory-limit --enable-wddx
--enable-filepro --enable-dbase
--with-config-file-path=/etc/php4/apache
--with-apxs=/usr/bin/apxs --with-fdftk=/usr/local
resp. --with-fdftk=shared,/usr/local
Reproduce code:
---------------
$fdf_doc = fdf_create () or error_log ( "test.php: \
fdf_create() failed", 0 );
fdf_save ( $fdf_doc, "/tmp/test.fdf" ) or error_log ( \
"test.php: fdf_save() failed", 0 );
fdf_close ( $fdf_doc );
Expected result:
----------------
to have a fdf-file named /tmp/test.fdf ... sort of :-}
Actual result:
--------------
[04-Nov-2003 17:10:24] test.php: fdf_create() failed
[04-Nov-2003 17:10:24] PHP Warning: fdf_save() expects \
parameter 1 to be resource, boolean given in \
/var/apache/htdocs/test.php on line 15
[04-Nov-2003 17:10:24] test.php: fdf_save() failed
[04-Nov-2003 17:10:24] PHP Warning: fdf_close(): supplied \
argument is not a valid fdf resource in \
/var/apache/htdocs/test.php on line 17
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26118&edit=1