Jump to content

Help Required on Notice: Undefined variable: cookie in (Move site from one server to another server)


Recommended Posts

Hello All, i have installed the prestashop on my main server and its running perfectly, now i have download all the files and database form main server and uploaded on another VPS server by applying the folder permission to 777 and also change in the settings settings.inc.php and when i try to view the main page it giving me these errors:


Notice: Undefined variable: cookie in /home/newyorkcell/public_html/classes/Category.php on line 454

Notice: Trying to get property of non-object in /home/newyorkcell/public_html/classes/Category.php on line 454

Notice: Undefined variable: cookie in /home/newyorkcell/public_html/classes/Category.php on line 454

Notice: Trying to get property of non-object in /home/newyorkcell/public_html/classes/Category.php on line 454



When i try to open the the Category.php file in the classes folder and see the line 454 then that line says:

$row['id_image'] = (file_exists(_PS_CAT_IMG_DIR_.$row['id_category'].'.jpg')) ? $row['id_category'] : Language::getIsoById($cookie->id_lang).'en-default-medium';


I think so its not getting the value of $cook->id_lang :(

Can any one please tell me what is the reason of this error and how we can overcome it.

Your help and suggestions are higly appreciated!


Thanks & Best Regards

Faisal Zafar

Link to comment
Share on other sites

×
×
  • Create New...