• Resolved snippet24

    (@snippet24)


    Even though I set all the api requirements it returns the following errors:

    Impossible to connect, please check your Algolia Application Id.
    We were unable to authenticate you against the Algolia servers with the provided information. Please ensure that you used a valid Application ID and Admin API key.

    Maybe it requires an extra php module? curl is active…
    Edit added mbstring and openssl as stated in the faq..still doesn’t work

    • This topic was modified 4 years, 3 months ago by snippet24.
    • This topic was modified 4 years, 3 months ago by snippet24.
    • This topic was modified 4 years, 3 months ago by snippet24.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Feels to me like all found configuration options are failing to connect like needed and thus it’s reaching this error point. Do you have any sort of firewall or ports closed that could be contributing to this?

    The error above is thrown in the request method inside the ApiWrapper class found in includes/libraries/algoliasearch-client-php/src/RetryStrategy/ApiWrapper.php Not sure if you’re handy with something like XDebug but I’d end up setting up some breakpoints in there to see what’s happening myself. If you have logging enabled or know where the logs are stored, the method shows it should be writing something to those.

    Thread Starter snippet24

    (@snippet24)

    Not sure if you’re handy with something like XDebug

    First time I hear about it :/

    If you have logging enabled or know where the logs are stored, the method shows it should be writing something to those.

    you mean WordPress debug mode?

    Edit: I noticed Uniform server has the xdebug php module enabled by default…

    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Noted on line one.

    Potentially but not guaranteed. I’m not sure how much we’ve wired up the debug logging that came with the plugin when we took it on for ongoing support.

    I did ask around internally a moment and was provided this link and solution: https://github.com/WebDevStudios/wp-search-with-algolia/issues/87#issuecomment-683005495

    This will apply if you’re using Local by Flywheel on Windows. Basically cURL couldn’t verify the HTTPS connection with Algolia, because the php.ini’s curl.cainfo didn’t point to a legit root cert

    Thread Starter snippet24

    (@snippet24)

    Well I’m using Uniform Server Portable
    https://sourceforge.net/projects/miniserver/files/Uniform%20Server%20ZeroXIV/14_0_2_ZeroXIV/
    Perhaps is best if you can reproduce the issue with it?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I don’t have windows available at the moment so at least for me personally that’s not so much an option.

    I am curious if it’d work just fine on a non-local install for you, or if there’s something specific to your site that’s preventing success here, local or otherwise.

    That said, I’d still be most curious what the API request responses are, but I have no way to determine what those are as I can’t access your local copy.

    Thread Starter snippet24

    (@snippet24)

    Okey, well first I found no php.ini.hbs file, and there’s isn’t as well a “conf\php\” folder so I guess I have to create both of them. So if I create them the file “php.ini.hbs” should contain this code?

    [curl]
    ; A default value for the CURLOPT_CAINFO option. This is required to be an absolute path.
    curl.cainfo = "d:\dev\xampp\apache\bin\curl-ca-bundle.crt"
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    To clarify, “Local by Flywheel” is a local development application and the mentioned php.ini.hbs file is one specific to it, so you don’t need to create one.

    What we’d be essentially looking for, if your issue is close to the same, is wherever Uniform Server Portable stores its php configuration files. You’ll want to open, review, and potentially edit those.

    You’ll also need to make sure your path values are matching your own install, as opposed to copy/pasting exactly what Dave has in his comment on GitHub.

    Thread Starter snippet24

    (@snippet24)

    Yes it worked!!! ?? it returns this now:

    We succesfully managed to connect to the Algolia servers with the provided information. Your search API key has also been checked and is OK.

    Question: in the future these steps should not be necessary?

    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unsure how necessary what steps you took will be needed, as it’s more specific to your local dev environment instead of the plugin itself.

    Thread Starter snippet24

    (@snippet24)

    Okey I did as follows
    1. extracted the certificate file and moved it on to

    L:\UniServerZvweb2020-12-03vYoastSEO\core\apache2\bin\curl-ca-bundle.crt
    2. to the php.ini file in use by Uniform server added these lines
    [curl]

    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    curl.cainfo = L:\UniServerZvweb2020-12-03vYoastSEO\core\apache2\bin\curl-ca-bundle.crt

    3. restarted the local server

    • This reply was modified 4 years, 3 months ago by snippet24.
    • This reply was modified 4 years, 3 months ago by snippet24.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Problem using it on local WordPress installation’ is closed to new replies.