Friday, September 11, 2009

Magento not working on PHP 5.3

Magento not working on PHP 5.3


For those who have noticed this error


Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php


when trying to install Magento on PHP 5.3, do not fear, here is the fix:


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=’,')


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']);


1 comment:

  1. ... and for those who are just seeing a blank page while trying to install... just set display_errors to on and error_reporting to E_ALL or look for your log files

    ReplyDelete