Installing Magento 1.3.2.4 in Php 5.3 server

Magento ver. 1.3.2.4 or old version installation in PHP 5.3 server fix/hack

The tutorial explain on how to install Magento ver. 1.3.2.4 to a upgraded php 5.3 server. Also applicable to later version which is still using deprecated php function such us split, ereg and etc.

Affected areas are installation , front end and admin pages.

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

Here is my fix:
1. Unzip Magento to your root.
2. Update the following files below .
app\code\core\Mage\Catalog\sql\catalog_setup\mysql4-upgrade-0.7.39-0.7.40.php
app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php
app/code/core/Mage/Donwloadable/sql/donwloadable_setup/mysql4-install-0.1.0.php
app/code/core/Mage/Donwloadable/sql/donwloadable_setupmysql4-upgrade-0.1.0-0.1.1.php

Look for:
$applyTo = split(‘,’, $installer->getAttribute(‘catalog_product’, $field, ‘apply_to’));
Change to this:
$applyTo = explode(‘,’, $installer->getAttribute(‘catalog_product’, $field, ‘apply_to’));



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

Change from :
public function ___toString(array $arrAttributes = array(), $valueSeparator=’,')
To this:
public function __invoke(array $arrAttributes = array(), $valueSeparator=’,')

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

app/code/core/Mage/Admin/Model/User.php
Change from :
$nodePath = ‘adminhtml/menu/’ . join(‘/children/’, split(‘/’, $startupPage)) . ‘/action’;
To this:
$nodePath = ‘adminhtml/menu/’ . join(‘/children/’, explode(‘/’, $startupPage)) . ‘/action’;

3. Follow the rest installation instruction here.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Reddit
  • Smarking
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Simpy
  • Propeller
  • Fark
  • LinkedIn
  • Live
  • Mixx

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment