|
Posted by Jim Michaels on 04/25/06 23:54
"fletch" <richard.a.fletcher@googlemail.com> wrote in message
news:1145948393.615104.105020@i39g2000cwa.googlegroups.com...
>> If PHP is being loaded as an apache .SO (DLL) dynamically linked module
>> (likely) - would this explain why it's not getting a new pid? PHP
>> wouldn't
>> be a new process. Apache would be the process instead of PHP. loading
>> up a
>> new module like PHP would simply allocate RAM for the shared functions.
>
> This makes sense, it wouldn't be true if PHP were running as CGI. I
> felt that if the two requests were coming in simultaneously then they
> would be dispatched to different apache child processes, giving
> different pids. If they ended up with the same pid then they came in at
> different times, because an apache child process will only do one
> request at a time.
>
> Let's crack this.
>
> The root problem is that a script is being called twice to deliver two
> different images. So somewhere you no doubt have something like,
> <img src="/image.php" />
>
> The problem is when you have many of these you get the same image.
>
> But you presumably dont have this:
>
> <img src="/image.php" />
> <img src="/image.php" />
that's what I've got. browser cache I guess (?). Well don't that beat all.
makes sense.
>
> because then the first call to the image would cache the image, giving
> you, well, exactly the same problem as you are having now. (Is this the
> problem?).
>
> So what you need is
>
> <img scr="/image.php?some_unique_junk" />
> <img scr="/image.php?some_other_unique_junk" />
hmm. which means it needs to be a javascript-generated random number for the
image to be different each time.
I get much more random results. took a bit of kickstart though. thanks.
>
> Which potentially gives you a parameter you can throw into seed()
>
> Now, you don't want the same unique junk for different images because
> caching works across page loads, so you need to effectively alias the
> images with another file name.
>
> HTH
>
[Back to original message]
|