473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

downloading file stored in mysql table through ssl

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
2 1571
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sreesekhar Palaparthy | last post by:
Hi, I want to store jpg files to BLOB field of a table. That table has other fields which are integer and char types. So i tried inserting image using LOAD DATA INTO ...... statement . It got...
1
by: Andy Fish | last post by:
Hi, I read in the mysql manual that it's possible to copy the 'frm' files from one mysql server to another, but when I try to do this I get the error "Can't open file: 'mytable.ibd' (errno: 1)"...
2
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am...
2
by: Mike | last post by:
I running MySQL locally and have the following dir setup C:\wamp\mysql\data\mike - This is where the tables for the database mike are stored C:\wamp\mysql\data - This is where I think the...
4
by: yehaimanish | last post by:
I am developing the project management system. Each Project: 1. Title, description ... , stored in mysql database 2. Upto ten files (initial description), (name in db, file in file system) 3....
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: kwfinken | last post by:
I am trying to download a file stored in a mysql database. When I try to use php to output the file, it does not get saved with the proper file name, but instead both IE7 and FF5 do not save the...
14
by: suryadithya | last post by:
Hi, I am very new to php. And I have got to submit a project very soon (By tomorrow evening). So please help. The problem is this. I have created a file upload mechanism where the uploaded files...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.