sngrl / sphinxsearch

Sphinx Search for Laravel 5
MIT License
124 stars 89 forks source link

Host name must be a string #36

Closed harunB10 closed 5 years ago

harunB10 commented 6 years ago

I get an exception InvalidArgumentException Host name must be a string.

Even though my settings are like this in sphinxsearch.php:

return [
    'host'    => '178.257.2.3',
    'port'    => 9312,
    'timeout' => 30,
    'indexes' => [
        'myIndex' => false,
    ],
];
mwbsmith commented 6 years ago

I had the same problem. Realized that the "publish" command was not placing the sphinxsearch.php file in my application config directory. I therefore thought that I should change the config in the vendor directory which of course is incorrect. Fixed by saving the sphinxsearch.php in my application config directory. Echo your $host and see if there is a value.