Wednesday, March 25, 2009

Installing Magento on WAMP XAMPP in XP Win7

**UPDATE 02/02/2011 - I will no longer be updating this post. I have started using the Magento Appliance from TurnKeyLinux.org and VirtualBox.

**UPDATED 10/20/2010 - For use with Wampserver 2, Magento 1.4.1.1 and Windows 7

I wrote once how to install Magento eCommerce package on XAMPP for testing purposes. Time went by, stuff has changed, and I now am having many problems installing Magento on XAMPP. So I've moved to WAMP which is very similar to XAMPP and easier to deal with in many ways.

WAMP is an easy to install LAMP environment used for testing. Magento is an open source ecommerce package. You should already have WAMP installed and a current copy of Magento, current version when writing this is
1.2.1.1
  1.4.1.1

1) Setup a magento database using phpmyadmin (goto: http://localhost/phpmyadmin/)

2) Edit httpd.conf file. Click the WAMP System Tray icon, go to the "Apache" menu click on httpd.conf change line (should be around)116:
#LoadModule rewrite_module modules/mod_rewrite.so
(remove the # )

3) Click on the WAMP System Tray icon. Go to the "PHP extensions" in the "PHP" menu and check mark the following extensions:
php_curl
php_pdo_mysql
4) "Restart all Services" on WAMP

5) Navigate to http://localhost/magento/ and follow the Magento install process. The default database username is "root" and there is no password.

That should be it. More details can be found on Magento's Wiki
-----------------------------------------------------------------
If your having problems logging into to admin area of Magento after install

Open this file > app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

Go to line 96: if (isset($cookieParams[’domain’])) {

and replace it with: if (isset($cookieParams[’domain’]) && !in_array("127.0.0.1", self::getValidatorData())) {

Do a full refresh of your browser (ctrl+F5) and try logging in again.

You may also have to add the following line to your hosts file (C:/Windows/System32/drivers/etc/hosts):
127.0.0.1 magento.localhost.com www.localhost.com

5 comments:

zac said...

Hi.. thanks for writing this. I am unable to set this up though.. I am using WAMP 2.0 (Apache 2.2.11 PHP 5.3) and there is no php_mcrypt.. also evey time I restart the services I have to close a bunch of warnings that tell me the curl module is already started. It is not checked and it will not allow me to check it. Just curious if you have any idea what is happening or if maybe I am just using a version that is different than what your instructions are for.

Thanks for any tips :)

Ray said...

WAMP 2.0 comes with PHP 5.3 which doesn't have a compatible version of mcrypt.

I had to download PHP 5.2.9-2 from http://www.wampserver.com/en/addons_php.php
and install it.

RedDotSteve said...

wamp 2.0h is the way to go

Cello said...

What about instructions for the new WAMPSERVER 2.0?

Has anyone tried?

Cello said...

Forgot to setup for follow up.