• Resolved studio_m

    (@studiomondiale)


    Hello,

    I just updated my PHP version to 8.3 and everything seemed to work smoothly.

    However, when I click on “Clear cache” in the advanced settings, the plugin does indeed clear the cache, but then tells me that my Google API key is invalid and that I’m not allowed to access any data: “Your Google API Key is not valid for this request and permission is denied”.

    Reverting back to PHP 8.2 fixes this behavior and everything works again, so something must be broken with PHP 8.3.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Noah Hearle

    (@designextreme)

    @studiomondiale I have been testing with PHP 8.4 recently and haven’t found anything new here. I will check with the matching PHP 8.3, but I think the matter may be elsewhere.

    Please can you check the Retrieved Data – does this have any further information?

    If there’s a problem saving new data, please select the follow from the General section:
    Clean Retrieved Data [X] Additional sanitisation of retrieved data – emoticons are removed from text

    This will remove emoticons that may not be stored when saving into some database collations.

    If you have error logging, do share an error or warnings if these appear. I will always release an update promptly to resolve this.

    Thread Starter studio_m

    (@studiomondiale)

    Hello,

    Thanks for the prompt reply.

    The sanitisation setting is active and has always been active. There is no new content to import, I’m afraid, so it can’t be a hiccup when importing new content.

    I have tried it multiple times now and can always reproduce the issue when switching the PHP version.

    However, I found the culprit:

    With PHP 8.2 active, it uses IPv4 to retrieve the data via Google API. This works, as I’ve allowed access for the IPv4 address in the Google API settings. PHP 8.3 on the other hand apparently uses IPv6, so I had to add the IPv6 address to the Google API settings as well.

    Your plugin only shows the IPv4 address and recommends adding this address to the Google API settings, so I recommend showing the IPv6 address in your plugin settings as well, urging users to add this to the Google API settings too.

    Plugin Author Noah Hearle

    (@designextreme)

    @studiomondiale Thanks for the update!

    The plugin tries to find the correct IP that is used as the server’s IP address. This is not always correct because Google may check the IPv4 or IPv6 versions. Within the error message and retrieved data, it does mention the IP it is expecting, so I would always recommend using this value as well as the plugin’s well-informed guess.

    Thanks again for letting me know of this issue’s status. It’s good to rule out a PHP error if there was a different cause.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Not working with PHP 8.3’ is closed to new replies.