I don't see how this can be a PHP problem.  If you say that a similar
script written in Perl doesn't cause this, then simply compare the output
of the Perl one to the PHP one and make sure they are sending the same
thing.  If your IE browser gets confused with the PHP version then it must
be sending something different from the Perl version.  There is no way for
IE to tell that the image came from PHP and not something else.

-Rasmus

On Sat, 2 Mar 2002, John Chronakis wrote:

> Hello,
>
> I have posted the following message to php-windows but i got no answer.
>
> I am using IIs 5 on windows 2k sp2 with php 4.1.1.
> There is a problem with the sctipt that follows and MSIE versions 5 to 6.
>
> A script sends a jpeg image to the client. It goes like this:
>
> ------------------------------------------------------
> $imgsrc = 'full path of the image file';
> ....
> header ("Content-type: some/image");
> header ("Content-disposition: attachment; filename=myimage.jpg");
> header ("Content-length: ".filesize($imgsrc) );
>
> $fp = fopen( $imgsrc, "rb" );
> if (!$fp) {
>     ..... Log the error .....
>     exit;
> }
>
> fpassthru ($fp);
>
> exit;
> ------------------------------------------------------
>
> It works fine if the user desides to save or open the image.
> But if the user cancels the download, Internet Explorer stops
> receiving anything from the site. Any click on a link hangs
> (IE displays in the status bar "Web site found. Waiting for reply")
> Links to static html files on my web server work
> and you can also browse any other sites, but nothing on my site that is
> parsed by php works.
>
> After some attemts (clicks and reloads), IIs reports the following message:
> "HTTP 403.9 - Access Forbidden: Too many users are connected
> Internet Information Services"
> Increasing the user limit on IIS, just requires a few more atemts to show
> this message.
> After I close all IE instances or restart IIS, everything works fine again.
>
> I have tried ignore_user_abort(1), sending expire headers, readfile()
> instead of
> fpassthru() etc but the problem persists.
> Nothing changes with older versions of php or IE.
>
> This problem does not happen when using Netscape (any version)
> or download managers.
> Similar script written in perl does not have the same problem.
>
> Please help. It is a very-very late to switch to another scripting language
> for this project (even using perl or asp for the download part requires a
> great
> deal of work).
>
> John Chronakis
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to