Thumbnails and access denied.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Smith

    Thumbnails and access denied.

    Hi,

    I'm having a problem with loading a page full of thumbnails.

    I'm useing this to load each thumbnail.

    header("Content-type: image/jpeg");
    readfile ($dir."/thumbs/".$filename );


    but, if your connection to the server is too fast (eg, your on a lan or
    the same ISP with broadband) the server will display a hand full of them
    and then the rest won't display, and then if you try to load another
    page within a couple of seconds, the server gives you the 403 page
    "Access Denied".

    But, when I load a page full of thumbnails that are direct links to the
    files it's fine. but when useing this script to read it seems to make
    the server pass-out momentarily. give it half a minute and it will
    server pages again.

    I have watched the server's CPU useage and memory (as it loads) and all
    seems fine.

    I have noticed that the problem goes if you run a squid proxy on the
    same box and it doesn't have trouble for people with slower connection
    eg. dial up modem.

    Anyone have any ideas what could be set wrong? buffer size maybe? do I
    have to close this function off at all?

    Any help much appriciated, I've been scraching my head on this for a
    couple of months now.

    J.

    btw - I have asked on the apache conf newsgroup with no luck.
  • James Smith

    #2
    Re: Thumbnails and access denied.

    James Smith wrote:
    [color=blue]
    > Hi,
    >
    > I'm having a problem with loading a page full of thumbnails.
    >
    > I'm useing this to load each thumbnail.
    >
    > header("Content-type: image/jpeg");
    > readfile ($dir."/thumbs/".$filename );
    >
    >
    > but, if your connection to the server is too fast (eg, your on a lan
    > or the same ISP with broadband) the server will display a hand full of
    > them and then the rest won't display, and then if you try to load
    > another page within a couple of seconds, the server gives you the 403
    > page "Access Denied".
    >
    > But, when I load a page full of thumbnails that are direct links to
    > the files it's fine. but when useing this script to read it seems to
    > make the server pass-out momentarily. give it half a minute and it
    > will server pages again.
    >
    > I have watched the server's CPU useage and memory (as it loads) and
    > all seems fine.
    >
    > I have noticed that the problem goes if you run a squid proxy on the
    > same box and it doesn't have trouble for people with slower connection
    > eg. dial up modem.
    >
    > Anyone have any ideas what could be set wrong? buffer size maybe? do I
    > have to close this function off at all?
    >
    > Any help much appriciated, I've been scraching my head on this for a
    > couple of months now.
    >
    > J.
    >
    > btw - I have asked on the apache conf newsgroup with no luck.[/color]

    Ok, I've noticed that this happens with other Broadband ISP's, but only
    when they are not using a proxy. Install a proxy and it works. Anyone
    have any idea on where I might be able to find a setting or something...

    the site is http://www.digitalsnapper.net

    J.

    Comment

    Working...