Use 3 consoles. One for the name service. One for the real server and the third one to execute the client script. console1 $ php5 nameserver.php console2 $ php5 server.php console3 $ php5 client3.php The system uses the CmdOpts class for getting parameters if provided. Currently server.php & client.php are not modified to use that so don't change the default listening message queues of the name service like that : php5 nameserver.php --REQUEST_QUEUE_NAME nsrt --REPLY_QUEUE_NAME nsrs