Jump to content

[SOLVED] Problem downloading Open xml file (mock xls) off https


Recommended Posts

I'm having some problems with my web application now that it's gone live... one of the main features was that the client was going to be able to download Excel files (well open Xml files in this case) from the web server. And I got all that working...

 

When they asked their site to be secured via Secure Certificate, I said no problem.

 

Now it seems the two together along with trying to download the file on IE causes a real issue with an alert box popping up stating "Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later"

 

The script to dynamically kick out the XML works on the intranet (no SSL certificate) and it also works with the SSL via firefox which the client will not deploy on their network.

 

I've read about 4 Microsoft KB articles including

http://support.microsoft.com/kb/234067

http://support.microsoft.com/kb/812935-I didn't see how to implement this one in a php context.

http://support.microsoft.com/kb/316431

http://fr.php.net/session_cache_limiter

 

is session_cache_limiter() what I should be using to get around this? (I did try this with

 

this is the code that works on the Intranet / FF

<?php
session_start();
header("Content-type: text/xml");
header('Content-Disposition: attachment; filename="PTMAssessments_'.$group.'.xml"');
header("Pragma: no-cache");
header("Expires: 0");

 

and then there were different things I was trying after reading the MS KB articles, such as...

 

<?php
session_start();
session_cache_limiter('public');
header("Content-type: text/xml");
header('Content-Disposition: attachment; filename="PTMAssessments_'.$group.'.xml"');
//header("Pragma: no-cache");
//header("Expires: 0");

 

if anyone has a solution to this Microsoft IE issue I would really appreciate it.

I finally figured out a fix (for others that might run across the same problem)

 

All the microsoft KB articles were basically worthless ~ imagine that.

 

here is the way I got mine to work

 

<?php
session_cache_limiter("must-revalidate");
session_start();
header("Content-type: text/xml");
header('Content-Disposition: attachment; filename="DMTMtests.xml"');
//header("Pragma: no-cache");
//header("Expires: 0");

$created = date('l jS \of F Y h:i:s A');

NOTICE that the session_cache_limiter is above the session_start();

 

IE now will allow the file to be saved.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.