When accessing Sphinx programmatically from PHP using SphinxAPI, the query command causes my web browser to think for about 30 seconds and then to fail without any log message I can find (or maybe a timeout?). So here is my code:
$cl = new SphinxClient();
$cl->SetServer("localhost", 9312);
$res = $cl->query($query, "isp");
At this point execution stops as if some error has occurred, but not logged in log or query_log locations of my sphinx.conf file.
For my sphinx.conf file, an abbreviated portion is:
searchd {
listen = 9312
listen = 9306:mysql41
log = {$MY_BASE}\ISP_Sphinx\log\searchd.log
query_log = {$MY_BASE}\ISP_Sphinx\log\query.log
read_timeout = 5
client_timeout = 300
max_children = 30
pid_file = {$MY_BASE}\ISP_Sphinx\log\searchd.pid
{$ETC, ETC, ETC}
}
From the DOS prompt, the search tool works as expected.
I have searchd running as a Windows Service as documented at the SphinxSearch site. I could post more of the sphinx.conf is anyone cares. This situation does not seem to match up with any others I have seen on Google. Sometimes it is a port issue as can be seen in other questions, but I don’t think that is so here.
So what could be causing the query command to think and fail, or at least where else might errors be dumped? I have also checked the Apache2 logs and nothing there in regards to this problem.
Using
localhostin Sphinx for Windows is a know issue. Please replacelocalhostby127.0.0.1.As stated in SphinxSearch/Troubleshooting: