title: PHPUnit_Framework_Exception: Could not connect to the Selenium RC server when I run with Hudson
body: <p>I have set up Hudson CI Server and running PHPUnit test with Selenium (big thanks to <a href="https://stackoverflow.com/questions/518083/how-might-i-integrate-phpunit-with-hudson-ci">this post</a>!). 
  Now I am running Hudson server and Selenium server on my localhost.
  I set up Hudson as port 8080 (default) and Selenium -port 1234 as it conflicts otherwise.</p>
  
  <p>However, every time I run Selenium test, I get a following error:</p>
  
  <blockquote>
    <p>PHPUnit_Framework_Exception: Could not connect to the Selenium RC server.</p>
    
    <p>/Users/***/.hudson/jobs/Selenium/workspace/sampleTest.php:28
    /usr/lib/php/phing.php:37 </p>
  </blockquote>
  
  <p>where line 28 is an assertion:
  $this->assertElementContainsText($html, "this is sample test");</p>
  
  <p>and here is my Selenium setup function:</p>
  
  <blockquote>
    <p>function setUp()   {<br>
    $this->setBrowser("*firefox");<br>
    $this->setHost("localhost");<br>
    $this->setPort(1234);<br>
    $this->setBrowserUrl("example.com");<br>
    $this->setTimeout(100000);   }</p>
  </blockquote>
  
  <p>how can I avoid this error message? 
  your suggestions are greatly appreciated. </p>
  
  <p>thanks all,</p>