title: Php connection to Sphinx refused
body: <p>I have installed Sphinx on my server and everything seems to working, except that when I run the test.php from web browser, I am getting this error:
  Query failed: connection to localhost:9312 failed (errno=111, msg=Connection refused).</p>
  
  <p>I have searched online, including stack overflow, almost all suggestions were make sure the searchd service is running, and it's listening on the right port. I can say yes to both questions because if run the same test program directly in command line, everything works. I understand that the hosting provider may not have opened the port, but the port should be listening with the server, right? The fact that it works under command line should confirm that the service is listening on that port and the php program is able to get through to it. So I don't understand why the same program run from the web browser rejects the connection.</p>
  
  <p>I have also enabled fsockopen in php.ini.</p>
  
  <p>Any suggestion to help understand why the connection is rejected or even better how to solve it is very welcome!</p>
  
  <p>Thanks</p>