algolia / algoliasearch-client-php

⚡️ A fully-featured and blazing-fast PHP API client to interact with Algolia.
https://www.algolia.com/doc/api-client/php/getting-started/
MIT License
671 stars 116 forks source link

Impossible to connect, please check your Algolia Application Id. php API #549

Closed huangkang1995 closed 5 years ago

huangkang1995 commented 5 years ago

//

Source code:

composer autoload require DIR . '/autoload.php'; // if you are not using composer // require_once 'path/to/algolia/folder/autoload.php';

$appId = '5MNXH314CI'; $apiKey = '6f'; $apiSearchKey = 'a8';

Algolia\AlgoliaSearch\Log\DebugLogger::enable();

$client = Algolia\AlgoliaSearch\SearchClient::create($appId,$apiKey );

$index = $client->initIndex('magento_uk_products'); $list = $index->search("pillowcase");

var_dump($list);

error:

An internal server error occurred on 5mnxh314ci-3.algolianet.com An internal server error occurred on 5mnxh314ci-2.algolianet.com An internal server error occurred on 5mnxh314ci-1.algolianet.com An internal server error occurred on 5mnxh314ci-dsn.algolia.net

Fatal error: Uncaught exception 'Algolia\AlgoliaSearch\Exceptions\UnreachableException' with message 'Impossible to connect, please check your Algolia Application Id.' in D:\wamp64\www\algo2\src\RetryStrategy\ApiWrapper.php on line 179

I hope we can get a solution as soon as possible. Thank you.

nunomaduro commented 5 years ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel: https://www.algolia.com/support.

Please only use this issue tracker for reporting bugs with the library itself.

Thanks!