• Resolved jackyposs

    (@jackyposs)


    Hi,
    We are using this plugin All in One SEO Pack but we encountered an issue with our tiny server where some of the request somehow reached a function called “isYandexUserAgent” which uses the variable $_SERVER[‘HTTP_USER_AGENT’], somehow the variable is not provided and is causing an error on the server, and with enough overload of the error, the server just turned off the WordPress server process, although the server ssh itself is still running, restarting the server or the WordPress process could fix the issue, but if continuous requests are made with the same pattern, the website could be down multiple times.

    Thus for the code in /app/Common/Traits/Helpers/ThirdParty.php
    I would like to suggest a revision from

    public function isYandexUserAgent() {
    	return preg_match( '#.*Yandex.*#', $_SERVER['HTTP_USER_AGENT'] );
    }

    to

    public function isYandexUserAgent() {
    	if(!isset($_SERVER['HTTP_USER_AGENT']))
    		return false;
    	return preg_match( '#.*Yandex.*#', $_SERVER['HTTP_USER_AGENT'] );
    }
Viewing 1 replies (of 1 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @jackyposs,

    Thank you for reporting this error.

    You’re actually in luck because we were already aware of this particular and have fixed in it hour next update, which is conveniently being released in the next few hours.

    You should no longer experience any issues once you’ve updated to the new version.

Viewing 1 replies (of 1 total)
  • The topic ‘Error causing server to overload and kill WordPress’ is closed to new replies.