Making Magento 1.3 run on PHP 5.3
September 3rd, 2009
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.