php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34811 fdf_get_value max size
Submitted: 2005-10-10 15:45 UTC Modified: 2008-07-11 21:12 UTC
Votes:8
Avg. Score:4.8 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:1 (14.3%)
From: kc at netspirit dot ch Assigned: steinm (profile)
Status: Wont fix Package: FDF related
PHP Version: 4.4.0 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
38 + 41 = ?
Subscribe to this entry?

 
 [2005-10-10 15:45 UTC] kc at netspirit dot ch
Description:
------------
Problem getting value of PDF-Multiline-Fields if the value is loger than 256 chars.

found "ASInt32 nr, size = 256;" in "PHP_FUNCTION(fdf_get_value)" in "ext/fdf/fdf.c"

Reproduce code:
---------------
Reprodiction:

- go to: http://www.anyform.ch/test/132.pdf
- fill in the big field
- click on "Ausgabe-Optionen"

Expected result:
----------------
strText32 is of type string "hdsfj ....... sdfhjsd" 



Actual result:
--------------
strText32 is of type boolean "" 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-10 15:55 UTC] kc at netspirit dot ch
code i used:

<?php
$pdformp = fopen("./test.dat", "w");
$fdf = fdf_open_string($HTTP_FDF_DATA);
while ($field = fdf_next_field_name($fdf, $field)) {
	echo "$field is of type " . gettype ( fdf_get_value ( $fdf, $field ) ) . " \"" . fdf_get_value ( $fdf, $field ) . "\" ";
	fwrite($pdformp, "$field=" . fdf_get_value ( $fdf, $field ) . "\n");
}
fdf_close($fdf);
fclose($pdformp);
?>
 [2005-10-11 14:09 UTC] tony2001@php.net
Assigned to the maintainer.
 [2006-10-11 21:33 UTC] randyharden at utah dot gov
I have a pdf file with a text field (FooField) that can exceed 255 characters in length.  I submit the form data using javascript command:
this.submitForm ("http://urlname/Submit_Form.php");

In Submit_Form.php....

$fdf = fdf_open_string(file_get_contents("php://input"));
$str = fdf_save_string($fdf);
//(the echo $str shows that all of the text string is their even if the string length exceeds 255 characters)
echo $str;

but... if I try to extract the value using:

$FooField=fdf_get_value($fdf, "FooField");

I get the correct results for strings up to 255 characters
but I get NULL as a result for strings > 255 chaaracters.
 [2008-07-11 21:12 UTC] jani@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 18:01:28 2024 UTC