note 30413 added to function.fdf-create

From: Date: Mon, 17 Mar 2003 17:43:20 +0000
Subject: note 30413 added to function.fdf-create
Groups: php.notes 
Request: Send a blank email to php-notes+get-45422@lists.php.net to get a copy of this message
I thought the following might save someone a lot of time. The example fdf snippet above, namely: <?php $outfdf = fdf_create(); fdf_set_value($outfdf, "volume", $volume, 0); fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf"); fdf_save($outfdf, "outtest.fdf"); fdf_close($outfdf); Header("Content-type: application/vnd.fdf"); $fp = fopen("outtest.fdf", "r"); fpassthru($fp); unlink("outtest.fdf"); ?> will not work (or there's at least a big possibility it won't) in IE (version 6 sure and I suspect lower versions as well) if you have session.auto_start on. Apparently, setting a cookie before feeding the fdf to the browser somehow messes it up. It works fine in Netscape though. I spent days on Google before I found a post somewhere about someone else having the same problem. The solution? Well, I created a separate directory in the web tree and turned session.auto_start off just for that directory like this: <Location /new_directory> php_admin_flag session.auto_start 0 </Location> Hope this was useful to somebody. -- http://www.php.net/manual/en/function.fdf-create.php http://master.php.net/manage/user-notes.php?action=edit+30413 http://master.php.net/manage/user-notes.php?action=delete+30413 http://master.php.net/manage/user-notes.php?action=reject+30413

« previous php.notes (#45422) next »