Thursday 5 January 2012

How to Solve magento v1.3 errors

Hi Friends,
     
  • first check that is version is 1.3 and 1.3 series
  • all that version faces same problem
  • To rectify those problem use the following code
1. The fatal error toString at first:

open
lib/Varien/Object.php (line 484)

change this line


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

to


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

As next I disable the deprecated messages.
This error messages are only a advice that this string is not allowed in php6!
So at this time we don’t need this deprecated messages (we using php 5.3).


2. Disable the DEPRECATED messages in Fronend and download manager
open

index.php

change


error_reporting(E_ALL E_STRICT);

to
error_reporting(E_ALL E_STRICT & ~E_DEPRECATED);

open

downloader/Maged/Pear.php

change


error_reporting(E_ALL & ~E_NOTICE);

to


error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

open

lib/Varien/Pear.php

change


error_reporting(E_ALL & ~E_NOTICE);

to


error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
 
 
  • check now in front end and also in backend 
  • incase any error comes in back end use this following code
Open the file lib/Varien/Object.php, and do the following change:

Look for the line:

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

Change it to:

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

Now, go to the file: app\code\core\Mage\Core\Controller\Request\Http.php and change:

Look for the line:

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

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

Also, go to app\code\core\Mage\Catalog\Model\Category\Attribute\Backend\Sortby.php and change:

Look for the line:

$object->setData($attributeCode, split(‘,’, $data));

Replace With:

$object->setData($attributeCode, explode(‘,’, $data));

Finally, open the file: app\code\core\Mage\Admin\Model\User.php and change:
Look for the line:

$nodePath = ‘adminhtml/menu/’ . join(‘/children/’, split(‘/’, $startupPage)) . ‘/action’;

Replace With:

$nodePath = ‘adminhtml/menu/’ . join(‘/children/’, explode(‘/’, $startupPage)) . ‘/action’;

That’s it, you Magento environment should run again.
 
 
 
 

No comments:

Post a Comment