php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16209 FDF does not work when using session_start()
Submitted: 2002-03-21 14:27 UTC Modified: 2002-03-21 18:24 UTC
From: tnguyen at scpie dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.0.6 OS: windows NT sp6
Private report: No CVE-ID: None
 [2002-03-21 14:27 UTC] tnguyen at scpie dot com
It seems that the following script will not work properly with the session_start();

<?php

session_start();

//path to pdf file
$url="http://www.some_url.com/form.pdf";

$values=$HTTP_POST_VARS;

$fdfdata = "%FDF-1.2\n%????\n";
$fdfdata .= "1 0 obj \n<< /FDF ";
$fdfdata .= "<< /Fields [\n"; 

//loop that adds the field names and values
foreach($values as $key=>$val)
	{
	$fdfdata.="<< /V ($val)/T ($key) >> ";
	}

	
$fdfdata .= "]\n";
$fdfdata .= "/F ($url) >>";
$fdfdata .= ">>\nendobj\ntrailer\n<<\n/Root 1 0
R\n>>\n";
$fdfdata .= "%%EOF";

/*** Now we display the FDF data which causes Acrobat to start  ***/

header ("Content-Type: application/vnd.fdf");
print $fdfdata;

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-21 14:32 UTC] hholzgra@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-03-21 14:43 UTC] tnguyen at scpie dot com
This is not a support issue.  I know how to get the fdf to work properly.  It doesn't seem correct that I just add session_start() to my script and it stops working.
 [2002-03-21 18:24 UTC] rasmus@php.net
I bet you are using IE.  Use a browser that actually works and you will see that your PDF comes up just fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 22:01:31 2024 UTC