开发者

Opening two connections to my Apache server?

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 runn开发者_如何学Pythoning 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜