views:

33

answers:

1

Hi guys.

I have an Apache server running PHP. Everything works fine.

But If I have a script that runs for a long time, and I try to open another page to the same server, the second page waits till my first page finishes.

This behavior happens to me on Linux and PC. I'm running Apache V2.2.9, and PHP 5.2.6.

I'm not sure why this happens... is this normal behavior?

UPDATE: I did some more tests following this... it seems that this only happens if I access a page on the same "session". If my long-running-page has a start_session() command, then I can't access more pages that also include sessions. If I try from another browser than it works fine... because it's a different session. Does this make sense?

Ron

+1  A: 

A-ha.

I read some more, and indeed if I use sessions, then I can't run concurrent requests:

http://www.php.net/manual/en/function.session-write-close.php

So all I have to do is 'write-close' when I don't need the session any more.

Ron

Ron Mertens