dumping data to excel via https and ie6 broken

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mr.kuhl@gmail.com

    dumping data to excel via https and ie6 broken

    I thought I would contribute a solution for once.

    We have a standard SUSE LAMP (Linux Apache Mysql PHP) server running
    some custom apps, of which one component is dumping reports out to
    excel. We are running this with https and all was good for a few
    months. IE6 and Firefox worked fine. One day around the end of July
    2005, IE6 stops doing the excel part.. Excel errors out with a "Could
    not open 'https://blah.com?report .php'" . Firefox continues to work
    fine. It turns out something has changed in an IE update from
    Microsoft that breaks the old method we employed to launch excel and
    feed it the data stream. This php code below contains the new headers
    which now make this work for us again. Firefox continues to work
    flawlessly with the new headers also!

    <?
    header("Content-Type: application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename=report .xls");
    header('Cache-Control: private, must-revalidate');
    header('Pragma: private'); // allow private caching
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    session_cache_l imiter("private , must-revalidate"); // allow private
    ?>

    BTW, we are using PHP 4.x and apache 1.3.x

    I hope this helps someone else, as it puzzled us for a while.

  • JDS

    #2
    Re: dumping data to excel via https and ie6 broken

    On Mon, 08 Aug 2005 06:47:53 -0700, mr.kuhl wrote:
    [color=blue]
    > I hope this helps someone else, as it puzzled us for a while.[/color]

    Thanks. I almost certainly will encounter this problem soon (and I didn't
    know about it until now).

    --
    JDS | jeffrey@example .invalid
    | http://www.newtnotes.com
    DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

    Comment

    • black francis

      #3
      Re: dumping data to excel via https and ie6 broken

      it's a known IE bug.
      add these lines at the top of your php script:

      session_cache_l imiter('private ');
      $cache_limiter = session_cache_l imiter();

      Comment

      Working...