Magento Upgrade: Problems/Errors and Solutions

Here are solution to some errors that I faced while upgrade Magento.

Error 1:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in downloader/pearlib/php/System.php on line 400

Solution:

Edit file named ‘pear‘. This file is present on root folder of your Magento installation.

Add the following lines at the beginning of file:

MAGE_PEAR_PHP_BIN=/usr/local/bin/php5;
export MAGE_PEAR_PHP_BIN

Error 2:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in downloader/mage.php on line 34

Solution:

Edit file named ‘mage‘. This file is present on root folder of your Magento installation.

Replace (on around line number 4)

#MAGE_PHP_BIN=”php”

With

MAGE_PHP_BIN=”/usr/local/php5/bin/php”

Error 3:

Mage registry key “_resource_helper/core” already exists

Solution:

Remove var/cache and var/session folder.

rm -rf var/cache
rm -rf var/session

Error 4:

Error in file: “app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” – Column “date” does not exists on table “catalog_product_index_website”

The error occurs because the rename was already executed before.

Solution:

Comment out the following:


/**
$installer->getConnection()->changeColumn(
$installer->getTable('catalog/product_index_website'),
'date',
'website_date',
array(
'type' => Varien_Db_Ddl_Table::TYPE_DATE,
'comment' => 'Website Date'
)
);
**/

Here are some more Magento upgrade issues and their solution: Magento upgrade

Hope it helps. Thanks.