Hello,
I am currently having some issues with a website that was coded in PHP (not by me), after migrating it to a different webhost.
There are several issues. The main one that I am looking to resolve right now is that the language and region can no longer be switched manually by the user. The issue seems to be expired cookies, which are not being taken by the server. However, changing the code has not helped. Please see the code that seems to be the problem:
public function setLanguage($lang) {
if(in_array($lang, array_keys($this->_avalLangs))) {
$this->_language = $lang;
$langCookie = new CHttpCookie('language', $this->_language);
$langCookie->domain = $_SERVER['SERVER_NAME'];
$langCookie->expire = time()+64000000000;
$c = new CCookieCollection($this->_request);
$c->add('language', $langCookie);
} else {
$this->_language = $this->_getDefaultLanguage();
}
}
Neither the previous hosts (original devs) nor the new host have been able to resolve this issue, so I am reaching out here in hopes that someone can point me in the right direction.
Thanks in advance.