For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > February 2008 > RE: [PHP-WIN] Concurrency issue on session file on harddisk









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-WIN] Concurrency issue on session file on harddisk
Eric Colinet

2008-02-14, 8:03 am

Hi,

To quickly solve your problem, can't you just load a dummy HTML page =
(without the PHP extension if possible) in each frame that display =
nothing but "please wait..." and reload itself with a meta-refresh tag =
at different interval (say 1, 2 and 3 seconds)?

For the "real" problem, you should triple-check the rights on the =
D:\PHPTemp directory for the IIS user (is it on of the owner?). Also =
check that your D: is a local FAT32 or NTFS volume.=20

To experiment, you could check that using the PHP's flock function works =
as expected.

Eric


-----Message d'origine-----
De=A0: Stephan Weiher [mailto:stephan@fa-weiher.de]=20
Envoy=E9=A0: mercredi 13 f=E9vrier 2008 13:04
=C0=A0: php-windows@lists.php.net
Objet=A0: Re: [PHP-WIN] Concurrency issue on session file on harddisk

This was one of our first tries to solve the problem. Since =
session_start()=20
is called in the index.php containing the frameset declaration, php.exe=20
accesses the session file from both frames BEFORE processing any code =
out of=20
it. So a delay contruct will only be processed when session file access =
is=20
done :(



Greetings



Stephan Weiher





""Michael Southworth"" <mikesouthworth@gmail.com> schrieb im Newsbeitrag =

news:cbda40880802120650w3c87f1edy1166474
96d7b438a@mail.gmail.com...
>I should preface this by saying it has been a while since I have used =

php
> extensively, but my suggestion would be to try putting in a delay at =

the
> beginning of your PHPfile, before the session_start() command (or=20
> whichever
> method you choose to begin your session). As far as I can recall, the
> session needs to be initialized before any output is sent to the =

browser,
> but this does not mean you cannot execute a php code delay before you=20
> start
> the session. This may give you enough time for the other PHP request =

to
> complete, freeing up the required file.
>
> A potentially more robust, but equally untested option, would be to =

check
> the file itself before initializing the session. The session_id will =

be
> available in the super variables or via session_id(). Since the file =

names
> for a given session are based predictably on this id, you could=20
> potentially
> try to do a read access on the file. If this fails, poll and try =

again or
> timeout and fail gracefully. I am not very familiar with how the=20
> permissions
> on this would play out though.
>
> Those are two suggestions I could think of, hope that helps,
> -Michael Southworth
>
> On Feb 13, 2008 8:15 AM, Stephan Weiher <stephan@fa-weiher.de> wrote:
>
issue[color=darkred]
don't[color=darkred]
HTML=20[color=darkred]
the[color=darkred]
[color=darkred]
was[color=darkred]
in[color=darkred]
rendered/loaded[color=darkred]
>=20


--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com