Excel headers not working anymore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good morning,

I have been using PHP4.1, Apache, and MySQL for a few years now and have
never had a problem with my Excel headers.  When I want to output html to
Excel I place the following on the top of the page:

<?header ("Content-type: application/vnd.ms-excel");
header ("Content-Disposition: attachment" );

After moving to PHP 4.3, MS SQL Server, Windows 2000 Server I am having
problems with this header.  I get the message:
"Internet Explorer cannot download myfile.php from myintranet.net"

The message does not always appear.  Some of the files download, others do
not.  

I have tried to find the problem with the following methods.  They may shed
some light on this problem:
1) I removed the header to see how the file outputs in HTML.  They output
fine.
2) I used my local server (which runs Apache and PHP4.3) with the same files
and it downloads to excel perfectly!
3) I have compared the files that work with the ones that don't, removed
anything that seems unusual, and replaced sections from the files that
worked.  There still does not seem to be any pattern.  I thought the size of
the file generated would play a roll but it doesn't.  After shrinking the
output to a single character, some files still do not work!

Unfortunately it is more difficult to find support for PHP and Windows 2000
Server.  I have some doubts that the files are not downloading because of
default server security reasons (since some of the files work!).

Does anyone know what might be causing this problem?

- Matthew Perry

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux