WebKul
Feb 5
Method Varien_Object::__tostring() cannot take arguments in Magento

I downloaded a new Wamp server on my computer all things were working fine but when i try to install magento , i got a error like

Method Varien_Object::__tostring() cannot take arguments in C:\wamp\www\magento\lib\Varien\Object.php on line 488

After digging a lot finally i got the solution actually there is a conflict between Magento and higher version of PHP like php 5.3+ . So there is a step by step solution :-

File: /lib/Varien/Object.php (Line 484)

Change from

public function ___toString(array $arrAttributes = array(), $valueSeparator=’,')

to this

public function __invoke(array $arrAttributes = array(), $valueSeparator=’,')

and go to File /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change from

$host = split(‘:’, $_SERVER['HTTP_HOST']);

To this

$host = explode(‘:’, $_SERVER['HTTP_HOST']);

For more information please refer magento discussion board .enjoy ;)