Do You Like This Story?
The image above shows the error you will receive when trying to install Magento on a PC running WAMP, XAMPP etc. The error happens because Magento tries to validate the domain name under which you install the Magento system, when you use http://localhost as your domain Magento halts the install process completely. This can be a really annoying fact that stops a lot of people installing Magento on their home PC to evaluate it before committing to the system for there e-Commerce project. The short tutorial below will show you how to bypass this particular install error and successfully install Magento on your localhost test machine.
Firstly you will need to edit a Magento file to acheive this technique, it’s pretty easy to do so anyone should be able to follow this tutorial but if your not confident editing a file get a friend who is to do it for you. To edit any files we recommend that you use PSpad which is a text editor specifically built for editing php, javascript files etc.
1) Open you Magento folder and go to the directory /js/prototype/
2) You will see a file titled validation.js, open this file in your text editor.
3) Look for the code between lines 505 to 507, it should look like the code snippet below.
1 2 3 | ['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) }], |
1 2 3 | //['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) //}], |
You should now have a fully functional install of Magento on your WAMP, XAMPP install on your home PC or business development server. If you have any questions about this technique please leave a comment.
No comments:
Post a Comment