By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,722 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,722 IT Pros & Developers. It's quick & easy.

downloading file stored in mysql table through ssl

P: n/a
I have a table where I store some binary data. To retrieve this
information as a downloadable file, I use the following code:

header('Content-Type: $mimeType');
header("Content-length: $size");

// for filename, i store the filename in the table, so this does not
actually
// point to a physical file name on the file system
header("Content-Disposition: attachment; filename=$fileName");
header("Content-Description: PHP Generated Data");
echo $data;
return true;

If I go through a normal port (http), the file downloads no problem.
When I try this through ssl (https), I get the following error:

'Internet Explorer cannot download / from 192.168.0.9.'

Through port 80, the filename is set correctly. Through ssl, the
filename doesn't seem to be getting set. Is there a problem with
using 'Content-Disposition: attachment' through ssl?

Is there more information I should put in the header in order to make
this work? Thank you.

Sean Rowe
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Fri, 21 Oct 2004, Someone wrote:
I have a table where I store some binary data. To retrieve this
information as a downloadable file, I use the following code:

header('Content-Type: $mimeType');
[snip]

If I go through a normal port (http), the file downloads no problem.
When I try this through ssl (https), I get the following error:

'Internet Explorer cannot download / from 192.168.0.9.'


Did you copy and paste the actual code? If so, the $mimeType variable
won't get expanded here because of the single quotes:
http://www.php.net/manual/en/languag....syntax.single

I don't see why this would cause the symptoms you've described, however.

--
Matt
Jul 17 '05 #2

P: n/a
Actually, that was a misprint. it should be ", not ', and like i
said, this works fine through port 80.

Matt Raines <matt@rai#remove#nes.me.uk> wrote in message news:<Pi******************************@sibelius.om inor.local>...
On Fri, 21 Oct 2004, Someone wrote:
I have a table where I store some binary data. To retrieve this
information as a downloadable file, I use the following code:

header('Content-Type: $mimeType');
[snip]

If I go through a normal port (http), the file downloads no problem.
When I try this through ssl (https), I get the following error:

'Internet Explorer cannot download / from 192.168.0.9.'


Did you copy and paste the actual code? If so, the $mimeType variable
won't get expanded here because of the single quotes:
http://www.php.net/manual/en/languag....syntax.single

I don't see why this would cause the symptoms you've described, however.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.