Making Magento 1.3 run on PHP 5.3
With the release of PHP 5.3, many functions automatically trigger a function is deprecated error. With Magento, that error effectively stops execution, even if it’s actually just a small notice. I won’t beat around the bush – this is the quick and very dirty fix that turns off error reporting completely. Varien’s Object class also needs a small fix, but then you should be ready to go.
perl -p -i -e ‘s/^\s*(error_reporting)\(.*\);\s*$/$1(0);/g’ `find docs/ -name “*.php”`
perl -p -i -e ‘s/__toString/__invode/g’ docs/lib/Varien/Object.php
Hopefully the coming Magento 1.4 release will have fixed these issues, so a hack won’t be needed.
While researching the code, I noticed you used “__invode” instead of the new PHP 5.3 function “__invoke”. I wanted to ask if this was intentional (to prevent it from being called) or if this was in error.
Reference: http://us2.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.invoke
Ouch, I obviously made a typo
So far, it looks like Magento 1.4 will run flawlessly on PHP 5.3+ though.
So this is still running rock solid?
I want to use Magento 1.3, but REALLY don’t want to have to keep 5.2.x updated.