Please Cc: me directly, if possible.  Thanks!

[This got long, but a search for "Synopsis:" (two of them) should give the
gist.]

Originally, the machine (Linux 2.4.19-16mdk) had Mandrake 8 RPM's of PHP
4.2.3 and Apache 1.2.26

I was able to install LIBFDFTK.SO 5.0 and the .h file, symlinked to
lower-case libfdftk.so so Linux would like it, edited /etc/ld.so.conf and
did "ldconfig -v" to confirm its existence, and then downloaded PHP 4.2.3
source and compiled --with-fdftk=shared, shoved the resulting fdf.so into
the extensions directory, used http://php.net/dl('fdf.so') and was
succesfully using FDF to generate and process PDF Forms.

I wrote a hack (sample at http://php.net/fdf_enum_values) to dis-assemble
the PDF /Field object (Free Dimitry!) but it turned out to be not a good
enough hack later when more complex PDF Forms made the /Field object be a
"nested" array sort of thing.

Thus, I needed fdf_open_string and friends, which was only available in
PHP >= 4.3.0, in order to correctly process incoming forms.

Downloaded Apache 1.2.28 source and PHP 4.3.2 source, and started compiling.

Got Apache and PHP running okay, and even managed to configure and copy
and symlink enough things so all the old httpd.conf files and php.ini file
were being used, which got the server back to the original pre-FDF state.

Alas, then the real problems started.

1) If I configure --with-fdftk=shared, then the resulting fdf.so file yields:
/usr/local/apache/bin/httpd: relocation error:
/usr/lib/php/extensions/fdf.so: undefined symbol: FDFInitialize

Now I've used "diff" to convince myself that I really really *DO* have the
"fdf.so" from 4.3.2 in /usr/lib/php/extensions

And I've used "strings fdf.so" to verify that there is some kind of entry
for FDFInitialize in there.

Plus, I've used "strings LIBFDFTK.SO" to verify that there is some kind of
entry for FDFInitialize in there as well.

So I'll be damend if I can figure out why the symbol is undefined. 
Everybody involved seems to know about it, so why is it undefined?  Who's
supposed to have the function body?

Which .so file was supposed to define it?  How could it have managed to
disappear in between 4.2.3 and 4.3.2?


2) Hoping that I could perhaps get FDF support in "static" and not lose
the symbol, I re-compiled --with-fdftk (IE, not "shared")

phpinfo() then showed me that FDF was there:
fdf
FDF Support  enabled
FdfTk Version  5.0

Alas, attempting to use fdf_create() yielded:

FDF Error: An internal FDF Library error occurred

Gee, that's a useful error message.  Not.  How about some detail, Adobe?!


ldconfig -v *STILL* shows libfdftk.so getting loaded, so I don't think it
has suddenly disappeared from the OS.

The only other slightly weird thing is MySQL ended up being built-in to
PHP (argh!) so I get a ton of messages about duplicate symbols when trying
to load mysql.so   But I've seen that before on other boxes and safely
ignored it, and it sure shouldn't mess up FDF, right?...


Does anybody know of anything that changed between 4.2.3 and 4.3.2 that
would affect FDF support?

Can anybody tell me for 100% sure where the FDFInitialize symbol was
supposed to have been defined?  I figure it would be in LIBFDFTK.SO,
right?  Is there some way to convince PHP that it should be looking at the
modules loaded into Linux to find that -- It's already supposed to be
doing that, right?



Plan B:

Does anybody have a better hack for dis-assembling PDF /Field objects
recursively?  I don't *REALLY* want to back-track to 1.2.26 and 4.2.3, but
it's an option at least, if I can correctly parse the /Field object.



Synopsis:

PHP 4.2.3 + Apache 1.3.26 (RPM's) + fdf.so (source) works.

PHP 4.3.2 + Apache 1.3.28 (source) + fdf.so (source) yields:
/usr/local/apache/bin/httpd: relocation error:
/usr/lib/php/extensions/fdf.so: undefined symbol: FDFInitialize

PHP 4.3.2 + Apache 1.3.28 (source) + fdf (static) yields:
FDF Error: An internal FDF Library error occurred

If we can't fix those, anybody got a good hack for recursively
dis-assembling the /Field object in a PDF, preferably into a 1-D array?

Please Cc: me on replies if possible.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to