From: <Mar...@fi...> - 2006-03-17 08:56:26
|
Howdy Aaron, for Internet Explorer: When using an attachement Content-Dispositon, it seems the following=20 headers are also required: header("Cache-Control: cache, must-revalidate");=20 header("Pragma: public"); If you have Cache-Control as no-cache, IE fails. The header "Content-Type: application/force-download" is a hack as wel,=20 but fixed it for IE and FF. ---- START phpESP/admin/include/where/download.inc ---- default: // CSV, csv=5Ffull=5Fheader old method, csv=5Fshort=5Fheader ne= w=20 method header("Cache-Control: cache, must-revalidate"); header("Pragma: public"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment;=20 filename=3D$name.csv"); $output =3D survey=5Fgenerate=5Fresults($type, $sid); foreach ($output as $row ) { echo(implode(',', $row) . "\r\n"); } I have done several tests and those two lines fixed my script. (It was=20 trying to download a .csv) ---- END phpESP/admin/include/where/download.inc ---- Cheers Martin php...@li... schrieb am 07.03.2006 18:45:30: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 >=20 > >> Patches against current CVS would be graciously accepted. > > > > Maybe I can find a PHP hacker here who'd be interested. >=20 > I think the main problem is finding someone who has time :). >=20 >=20 >=20 > - -- Aaron > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >=20 > iD8DBQFEDca6uucONIvD0AMRAv0+AJ90PpWHi4Ld6qoHibXcJV6WfQtJjACeNc67 > i9VSNo73rRBYQ+NYR3uX8G8=3D > =3Duyq3 > -----END PGP SIGNATURE----- >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 language > that extends applications into web and mobile media. Attend the live=20 webcast > and join the prime developer group breaking into this new coding=20 territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general |
From: Peter F. <pe...@si...> - 2006-03-17 18:19:57
|
Mar...@fi... wrote: > Howdy Aaron, > > for Internet Explorer: > > When using an attachement Content-Dispositon, it seems the following > headers are also required: > > header("Cache-Control: cache, must-revalidate"); > header("Pragma: public"); > > If you have Cache-Control as no-cache, IE fails. > > The header "Content-Type: application/force-download" is a hack as wel, > but fixed it for IE and FF. Thanks very much, I'll give it a try. My impression, though, was that initiating the download wasn't the problem. It's that phpESP simply wasn't generating the data. This seems to be confirmed by the fact that it also generates a zero-length file if you pick "Save to server", where downloading is not involved. ///Peter > ---- START phpESP/admin/include/where/download.inc ---- > > default: > // CSV, csv_full_header old method, csv_short_header new > method > header("Cache-Control: cache, must-revalidate"); > header("Pragma: public"); > header("Content-Type: application/force-download"); > header("Content-Disposition: attachment; > filename=$name.csv"); > $output = survey_generate_results($type, $sid); > foreach ($output as $row ) { > echo(implode(',', $row) . "\r\n"); > } > > I have done several tests and those two lines fixed my script. (It was > trying to download a .csv) > > ---- END phpESP/admin/include/where/download.inc ---- > > Cheers > Martin > > > php...@li... schrieb am 07.03.2006 18:45:30: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >>>> Patches against current CVS would be graciously accepted. >>> Maybe I can find a PHP hacker here who'd be interested. >> I think the main problem is finding someone who has time :). >> >> >> >> - -- Aaron >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.2 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iD8DBQFEDca6uucONIvD0AMRAv0+AJ90PpWHi4Ld6qoHibXcJV6WfQtJjACeNc67 >> i9VSNo73rRBYQ+NYR3uX8G8= >> =uyq3 >> -----END PGP SIGNATURE----- >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting > language >> that extends applications into web and mobile media. Attend the live > webcast >> and join the prime developer group breaking into this new coding > territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> phpESP-general mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpesp-general > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general > > |
From: Matthew G. <mat...@gm...> - 2006-03-20 19:51:45
|
I've commited a fix for this to CVS and will be releasing a 1.8.1 for testing. On 3/17/06, Peter Flynn <pe...@si...> wrote: > > Mar...@fi... wrote: > > Howdy Aaron, > > > > for Internet Explorer: > > > > When using an attachement Content-Dispositon, it seems the following > > headers are also required: > > > > header("Cache-Control: cache, must-revalidate"); > > header("Pragma: public"); > > > > If you have Cache-Control as no-cache, IE fails. > > > > The header "Content-Type: application/force-download" is a hack as wel, > > but fixed it for IE and FF. > > Thanks very much, I'll give it a try. > > My impression, though, was that initiating the download wasn't > the problem. It's that phpESP simply wasn't generating the data. > This seems to be confirmed by the fact that it also generates a > zero-length file if you pick "Save to server", where downloading > is not involved. > > ///Peter > > > ---- START phpESP/admin/include/where/download.inc ---- > > > > default: > > // CSV, csv_full_header old method, csv_short_header new > > method > > header("Cache-Control: cache, must-revalidate"); > > header("Pragma: public"); > > header("Content-Type: application/force-download"); > > header("Content-Disposition: attachment; > > filename=3D$name.csv"); > > $output =3D survey_generate_results($type, $sid); > > foreach ($output as $row ) { > > echo(implode(',', $row) . "\r\n"); > > } > > > > I have done several tests and those two lines fixed my script. (It was > > trying to download a .csv) > > > > ---- END phpESP/admin/include/where/download.inc ---- > > > > Cheers > > Martin > > > > > > php...@li... schrieb am 07.03.200618:45:3= 0: > > > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> > >>>> Patches against current CVS would be graciously accepted. > >>> Maybe I can find a PHP hacker here who'd be interested. > >> I think the main problem is finding someone who has time :). > >> > >> > >> > >> - -- Aaron > >> -----BEGIN PGP SIGNATURE----- > >> Version: GnuPG v1.4.2 (MingW32) > >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >> > >> iD8DBQFEDca6uucONIvD0AMRAv0+AJ90PpWHi4Ld6qoHibXcJV6WfQtJjACeNc67 > >> i9VSNo73rRBYQ+NYR3uX8G8=3D > >> =3Duyq3 > >> -----END PGP SIGNATURE----- > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > >> that extends applications into web and mobile media. Attend the live > > webcast > >> and join the prime developer group breaking into this new coding > > territory! > >> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > >> _______________________________________________ > >> phpESP-general mailing list > >> php...@li... > >> https://lists.sourceforge.net/lists/listinfo/phpesp-general > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > > that extends applications into web and mobile media. Attend the live > webcast > > and join the prime developer group breaking into this new coding > territory! > > > http://sel.as-us.falkag.net/sel?cmd______________________________________= _________ > > phpESP-general mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpesp-general > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general > -- D'oh! |
From: Peter F. <pe...@si...> - 2006-03-20 23:20:48
|
Matthew Gregg wrote: > I've commited a fix for this to CVS and will be releasing a 1.8.1 for > testing. Excellent! Many thanks. ///Peter |