Pitfalls to avoid when installing Magento on XAMP

Magento is a PHP open-source online shop platform built to scale, so they say.
XAMP is the best way to develop PHP locally on your machine. It gives you an easy to run and configure Apache, MySQL and few other stuff.

The new Magento ( doesn’t completely support PHP5.3 and above. The last version of XAMP 1.7.3 comes with PHP 5.3.1. Because of that the installation might have some errors. Luckily there are some workarounds.

Generally the Magento on XAMP installation manual is fine, but, here are some of the common problems that might occur:

If you get this error:
*Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php
Go here.

If you get this error:
Parse error: parse error, expecting ’&” orT_VARIABLE’ in C:libVarienObject.php on line 498
Its because you copy and pasted the code from the previous link and "an apostrophe is used in the end of the lines instead of the single quote"
(From comment 13 in the previous link)

If you get this error:
Unknown error (8192): Function split() is deprecated in ….
in the frontend or
Unknown error (8192): Assigning the return value of new by reference is deprecated in …
in the connectManager.

Follow the instruction in here. (part of it is the same as the afford mentioned)

If installation goes fine but you can’t login into your admin: (It’s a cookie issue)
Add this to your c:windowssystem32driversetchosts file        magento.localhost.com www.localhost.com
Browsing to magento.localhost.com/magento worked for me.
More info

just in case –> to edit the hosts file on vista/win7 -> right-click on notepad –> run as admin… –> open the file.

Generally there is a chance that the installation won’t be smooth,
but don’t give up cause it seems that every issue has already been solved by someone out there.

Just google it!

Guy A

Read more posts by this author.