Installing Magento in MAMP

Magento. Truly the kitchen sink of open source shopping carts and e-commerce packages, and with enough features to shake a stick or spanner at, but like a kitchen sink, it can take a little specialist knowledge to install.

Attempting a localhost installation of Magento v1.3.2.4, using Godsend and development life-saver MAMP, I came across an issue unseen in previous versions, and although the issue is documented, it may be of some benefit to explain its work around in more detail, especially when in combination with MAMP

During installation Magento sets cookies, and many browsers will refuse to accept them when the installation is at the MAMP default URL, http://localhost.

As the Magento installation notes explain:

DNS resolution (important)
During the installation Magento will set cookies and most browsers will refuse to accept cookies for localhost. This can lead to several problems but no error messages. E.g. when trying to set the locale the page will just refresh and revert to the standard En-US locale. To avoid this problem create another entry for localhost in your /etc/hosts file and use that hostname to access the site:
127.0.0.1 locahost www.localhost.com

Aside from being unable to set location information during install, I had the more critical issue of being unable to log into the Admin page afterwards, both in Firefox and Safari—basically a complete show stopper.

The workaround is as suggested in the install documentation, but slightly adapted for MAMP.

Creating a new host in MAMP

1. Open the MAMP application
2. Navigate to the Hosts panel
3. Create a new entry for localhost:

Server Name: www.localhost.com
Disk location: /Applications/MAMP/htdocs (default MAMP site root)

Special Operations: Installing Magento in MAMP

Which has the effect of changing your Magento installation location:

Default MAMP installation URL: http://localhost/magento
New MAMP installation URL: http://www.localhost.com/magento

Your browser will now accept cookies, and critical access to the Magento Admin page will be restored.

Tags: , ,


Fatal error: Call to undefined function do_sociable() in /home/sensitiv/public_html/wp/wp-content/themes/specialops/single-blog-post.php on line 54