|
Posted by Frank Arensmeier on 09/26/05 13:42
Hello.
For your information: It seems to me that the misbehaviour of Explorer
is neither related to the PHP script itself, nor it is related to the
PDF file created by the script. The basic problem is that Apache is
actually sending a header with a 404 - file not found status code
message. So, the .htaccess directive (ErrorDocument 404
/link-to-PHP-script.php) only "tells" Apache that it should present a
custom 404 page, which in my case is a PHP script. With this in mind, I
would say that MS Explorer behaves more "exact" so to say than other
browsers, which obviously accepts a PDF file as a custom 404 error
page.
Right now, I am investigating if there is a way to tell Apache not to
send the 404 header. I saw in the Apache manual that there is a module
called "ErrorHeader", but I was not able to write this rule with the
correct syntax into my .htaccess file yet. The line "ErrorHeader unset
404" gives a internal missconfiguration error.
Is there someone who is familiar with Apache and writing htaccess
directives? Or can someone recommend a general-purpose-userlist for
Apache related questions? I subscribed to users@httpd.apache.org, but
this list seems to have very low traffic.
/frank
2005-09-22 kl. 12.59 skrev Frank Arensmeier:
> Hello list-members
>
> I have written a script which dynamically generates PDF documents
> (with PDFlib). The link to the PDF file is presented as a static link
> (thanks btw to Richard Lynch and his previous contributions to this
> list on the subject "force download"). It is redirected to the script
> via a htaccess file. If the name of the PDF document matches a certain
> pattern, than the script will output the document, if not, a 404 error
> page will pop up. Everything works very well with all kinds of
> browsers, except Microsoft Explorer (tested with Windows Explorer 6
> SP1, Internet Explorer 5.2 for Macintosh). And I want to know why.
>
> Explorer shows the PDF document as plain text only. Trying to save the
> linked document to the computer (right click) gives something like
> "The server can not be reached or the document does not exist."
>
> I know that explorer is a real p.i.t.a. when it comes to all kinds of
> web standards. And my best guess is that this could have to do with
> headers, or?
>
> Google was not my friend this time, I might say.
>
> /frank
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
[Back to original message]
|