We have also faced the same issue.

What we did was updated :

$path = $_SERVER[‘HTTP_HOST’] . $_SERVER[REQUEST_URI];

to

$path = $_SERVER[‘HTTP_HOST’] . $_SERVER[REQUEST_URI];

i.e. change made : REQUEST_URI to ‘REQUEST_URI’

Let us know in the comment section if it works for you.

P.S : If you are not an experienced person to do it, we would recommend to pass it to your developer or contact your hosting provide to have a better understanding of the issue.