Accessing the same php file buy multiple users

Discussion in 'PHP' started by rob_v, Oct 10, 2007.

  1. #1
    I have the following situation.
    Im using a dispatcher to handle the different states that a user can be in while in my site.

    I ran into something earlier that concerned me a bit.

    Say I have the dispatcher that looks something like this : (lots of psudo code here)

    class Dispatcher extends Orig_Dispatcher
    {
    public function __construct($helperObjects, $request)
    {
    ...do stuff here
    }

    public function dispatch()
    {
    $func = $this->getRequest();
    $this->$func();
    }

    public function display()
    {
    require_once ('display_stuff..php');
    }

    public function doSomeThingElse()
    {
    require_once ('somethingelse..php');
    }
    }


    The url looks like this :
    example.com/?state=display


    If someone accesses that display fuction and that DB qry happens to take long time - then at the same time someone else trys to access that doSomeThingElse function - nothing happens until that display function by the different user finishes.
    I even replaced the DB stuff w/ a sleep 60 and got the same results.

    This is the first time Ive ran into this - but is this an accessibility issue w/ PHP?
    Any help or suggestions at all would be great.

    Thanks
    -Rob
     
    rob_v, Oct 10, 2007 IP