Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Problems with getting $HTTP_FDF_DATA



9:58 pm on Aug 31, 2004 (gmt 0)

10+ Year Member

I am using PHP 4.3.4 and apache 1.3.31, and I am trying to retrieve some form data from a pdf file by submitting it. I am unable to get the variables from $HTTP_FDF_DATA. I can get data from $GLOBALS and $HTTP_POST_VARS, for example, but when I try $HTTP_FDF_DATA, I get nothing. Is this a php issue with the fdf toolkit, or an issue with apache, or neither? Thanks in advance.


12:38 am on Sep 2, 2004 (gmt 0)

10+ Year Member

elgolferisto welcome to WebmasterWorld!

How exactly are you using it? It doesnt seem like it is used like $_POST and other $HTTP var's. Can you post a couple lines where you are using this? Also have you read PHP: Forms Data Format Functions [us4.php.net] from the PHP Manual?


2:09 pm on Sep 2, 2004 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Welcome to WebmasterWorld elgolferisto, and sorry I won't be more help...

In addition to the user-contributed notes in the manual (link provided by knowles), have a look at the bug report [bugs.php.net] for this problem.


5:15 pm on Sep 2, 2004 (gmt 0)

10+ Year Member

Thanks for your help so far guys. I'm happy to now be a member of WebmasterWorld after having browsed the forums for a while now.

Here is a piece of code I was trying to get working. After this failed, I just used a simple print statement, which is also shown below.

//snippet of my code
//open file
$fdf_doc = fdf_open_string($HTTP_FDF_DATA);
if(!is_resource($fdf_doc)) {
echo "fdf_doc is not a resource\n"
else {

I was using this code in my submit.php file, which is the action tied to the pdf form when the user enters data in the fields and then clicks Submit. When this didn't work (i.e. I got the "fdf_doc is not a resource" message), I decided to try just printing out the $HTTP_FDF_DATA to see what was there:

//print the $HTTP_FDF_DATA

This printed nothing.

I am using a similar submit.php file on another machine and everything is working as expected. This machine has Redhat 9, apache 1.3, and php-4.3.4, while the one with the problems has Mandrake 8.2, apache 1.3, and php-4.3.7. So, I tried removing the php-4.3.7, and installing php-4.3.4. Same result. I guess its possible that I didn't remove something completely from the newer version. How can I be sure that I did?

I have read the PHP FDF manual, but haven't found the help I needed there.


Featured Threads

Hot Threads This Week

Hot Threads This Month