Monday, January 3, 2011

When you are stuck in the middle of [ magento installation in WAMP environment.]

Today, I want to share this article for you and myself. Whenever I try to install Magento into my windows Vista WAMP server, I'm getting these errors but I am too stupid to write this down. Spending a couple of hours, I decided to do it. These are common error when I install Magento into my local windows machine.


Okay. Here's our guy.
Magento version 1.4.x with WAMP Server ver. 2.0 with Apache 2.2.11, PHP 5.3.0, mysql 5.1.36. in MS Windows Vista Home Premium Edition.


1. During installation, the screen is stuck with base URL validation problem.




















Because this URL I just typed in is not valid in the real world, Magento is too smart to accept this value. Here's cure.
  • Open {{magento installation directory}}/js/prototype/validation.js
  • Find around 500th row, put comment mark or remove these expression.
['validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v) {                return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)}],
  • Refresh installation screen, you will get green light to go.
  • Undo what you modified in validation.js
2. Can't log in to admin panel after installation
Let's admit it that we're installing into Wamp server, not real server. 
  • Open {{magento installation directory}}/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
  • find row 81-83, (remember my magento version is 1.4.1.1) and put comment like these.
//'domain' => $cookie->getConfigDomain(),
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()


Well, that's it. Finally, I got a good to go. I hope this help you little bit. AK

0 comments: