Zen Cart Logo
Forums / Installing on a Mac Server / MAMP/XAMPP set up local host

MAMP/XAMPP set up local host

Locked

Views: 55,913

Results 1 to 20 of 46
This thread is locked. New replies are disabled.
28 Apr 2008, 3:24 PM
#1
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

MAMP/XAMPP set up local host

I first tried installing MAMP but i seemed to have all sort of problems.

I then got the 'zen cart 400 page manual' which told me to use XAMPP, but the instructions are for windows. Does anyone know how to set up the local host for Mac?

I got my macbook pro a month ago so im sure ive got the latest os, etc.

Thanks

29 Apr 2008, 2:05 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: MAMP/XAMPP set up local host

I just, for the first time today, installed MAMP, and set up a Zen Cart site running on my new MacBook Pro. I'd say it was a painless process:

  1. Download the software from the mamp.info website
  2. Agree to install terms
  3. Drag the MAMP folder to the Applications folder (a usual Mac procedure)
  4. In the Applications/MAMP folder, double-click on the MAMP.app file
  5. Accept license, and choose just to use MAMP, and not MAMP PRO.
  6. Click on Start Servers in the MAMP application control window.
  7. Decided that I wanted to change the preferences so that Apache runs on port 80 (so I don't have to say localhost:8888 everything I want to look at my local server), so I clicked on Preferences, then on Apache, then on Use Apache and MySQL defaults, and saved the changes. It asked for my MAC user password in order to allow the system port change to be completed.
    (Make sure you do not have Personal Web Sharing turned on for your Mac if you are running your MAMP server on port 80. You can turn it off in System Preferences.)
  8. Clicked on Open Start Page, and it shows me all my appropriate settings such as my MySQL username and password so I can put them into my Zen Cart when I set it up.
  9. Clicked on the phpMyAdmin tab, and created a new database named zencart138.
  10. Use finder to create an /Applications/MAMP/htdocs/zencart folder (change "zencart" to whatever you prefer)
  11. Unzip a copy of Zen Cart files into that folder.
  12. Open the browser and point it to: http://localhost/zencart ... and Zen Cart fires up in Install mode.
  13. Fill in all the fields as appropriate, and complete installation.
  14. Access my store as usual via http://localhost/zencart and admin as http://localhost/zencart/admin

I found it to be very straightforward as far as installing an application on the Mac and as far as installing a website application.

29 Apr 2008, 10:17 AM
#3
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Thanks for the instructions. Ive uninstalled xampp and im trying mamp.

Step 12 isnt working. when i type in http://localhost/zencart i get 'Safari can’t connect to the server.'

29 Apr 2008, 11:44 AM
#4
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Turns out I needed the port number in the address as well. Thanks for the instructions, it seems to be working.

4 May 2008, 10:15 PM
#5
nick_h avatar

nick_h

New Zenner

Join Date:
Apr 2008
Location:
Nottingham, UK
Posts:
46
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Yes, MAMP uses port 8888 as default, but you change it to default Apache port 80 and it will then work without the port number.

That one scuppered me for quite a while when I switched to Mac :blink:

Nick

5 May 2008, 12:58 PM
#6
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

How do I set up my local host as https://www.example.com? the zen cart guide only has instructions for windows.
james

5 May 2008, 9:19 PM
#7
nick_h avatar

nick_h

New Zenner

Join Date:
Apr 2008
Location:
Nottingham, UK
Posts:
46
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

I didn't know that was possible - it would have been very helpful if I had done that with the shop I am currently working on!

5 May 2008, 11:51 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: MAMP/XAMPP set up local host

To set up https://www.example.com in MAMP, you follow the same steps as in the book, but with a couple variations due to the way the Mac OS operates:

  1. To edit your "hosts" file, instead of accessing C:\WINDOWS\system32\drivers\etc\hosts , you will need to edit /etc/hosts
    However, since that is a system file, you must do it with admin privileges, as follows:
    a) Open the Terminal.app application
    b) Type: sudo vi /etc/hosts
    c) enter your password if prompted (If you are an administrator, use your current password, if you're not an administrator of the computer, ask your administrator for the password, or get them to do it for you)
    d) Use the arrow keys to move down to the existing line that says 127.0.0.1 and press the letter** i**
    e) On the new line, fill in the new definition and press Return:
    127.0.0.1 https://www.example.com
    f) Press ESC then : then x then Return
    g) Type exit and press Return

  2. For the Configuring Apache step, your <xampp-home> refers to /Applications/MAMP/ ... which means you will be editing this file:
    /Applications/MAMP/conf/apache/httpd.conf

    (You can use Finder to locate the file, and edit it with TextEdit or your favorite text-only editor.
    Make the edits described in the book, and then save the file, and restart MAMP. It should work as described in the book, ie: pointing your browser to https://www.example.com should now show your MAMP sites.

15 May 2008, 11:59 PM
#9
khageman avatar

khageman

New Zenner

Join Date:
Mar 2008
Posts:
6
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

OK, I am new to Zencart.

I got to step 12 in DrByte's instructions and can't figure out what to do. When I put in http://localhost/zencart Safari can't connect. When I try to use 80 in the mix I cant get any other reaction from Safari. Help a newcomer, PLEASE!!!

KEN

16 May 2008, 6:47 AM
#10
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Make sure you do not have Personal Web Sharing turned on for your Mac if you are running your MAMP server on port 80.

Also check that you have **renamed **the uncompressed Zen Cart zipped file to something like "zencart" as per Step 10 of DrByte's instructions if you want to access your Zen Cart store at http://localhost/zencart. If you have renamed it to "shop", then access your Zen Cart store at http://localhost/shop.

16 May 2008, 7:45 AM
#11
nick_h avatar

nick_h

New Zenner

Join Date:
Apr 2008
Location:
Nottingham, UK
Posts:
46
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

KHageman: What is the URL shown when you start MAMP up and go to the MAMP homepage? Is it http://localhost:8888/MAMP? If so, then type in http://localhost:8888 and you will see a directory listing of your MAMP sites folder, and you can click on your Zencart folder to load it :)

19 May 2008, 6:01 PM
#12
nancee avatar

nancee

New Zenner

Join Date:
May 2008
Posts:
11
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Hello Am new to this website. In fact am a bit confussed now. I also have a Mac. Updated to the new OS X. I can not find any instructions on how to have it work with my Mac. Is there any if so could someone lead me to them. Please

20 May 2008, 1:05 AM
#13
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Look at the 2nd post in this thread where DrByte already outlined the steps to make it work on a Mac.

1 Jun 2008, 12:41 AM
#14
jeanr avatar

jeanr

New Zenner

Join Date:
May 2008
Posts:
1
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

I followed DrByte's instructions with no problem...but when i move back to the e-start book to the database setup screen, i am getting an error

Connection to Database failed
Access denied for 'root'@'localhost' (using password 'no')

i did put in zencart138 for the database name as that is what i specified in DrByte's instructions...

did i miss a step???

thanks!

1 Jun 2008, 2:17 AM
#15
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Your problem is likely due to the wrong password supplied to the MySQL database.

MAMP and XAMPP uses different default credentials to login to the MySQL database:

For MAMP, it is:

username=root
password=root
```XAMPP uses the following

username=root
password=[I]<blank>[/I]


Check both your configure.php files to verify the above MySQL credentials.
1 Jul 2008, 11:57 PM
#16
khageman avatar

khageman

New Zenner

Join Date:
Mar 2008
Posts:
6
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

I have Zencart Loaded and ready to start. I want to change the mane from localhost/zencart to https://www.example.com.

I bring up the Termnal.app and type in sudo vi /etc/hosts. It asks me for my password, but I am unable to type it in.

Can someone give me some help on this.

Thanks
Ken

2 Jul 2008, 10:36 PM
#17
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

I'm a bit confused. Do you mean you cannot enter the password when prompted or do you mean you cannot change the contents of the *hosts *file?

If it's the contents of the hosts file you want to change, remember to type the character i after entering your password. This will put the vi editor into Insert mode so you can enter any text. To exit Insert mode, hit the Esc key on your keyboard.

I suggest you re-read DrByte's post again as he has outlined the steps in great detail; including the need to type the i character as I have mentioned above.

3 Jul 2008, 4:53 PM
#18
roeghar avatar

roeghar

New Zenner

Join Date:
Dec 2005
Location:
Wisconsin
Posts:
38
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Well, I just have to jump in here to ask a question and make a comment. Why mess with MAMP/XAMPP at all when Mac OS X has it all built in already? I just recently upgraded my G5 ppc, on which I run my Zen Cart test server, from Panther 10.3.9 to Leopard 10.5 so I had to deal with this again (Instead of zencart pages, all I was served was a list of folders and question marks.) In Leopard php, mysql, and apache2 are all installed by default (I think it was the same with Panther, but its been a few years). In Leopard, however, php is not enabled by default, but all it takes is turning it on and making a few minor adjustments to get everything working correctly. This page in Macoshints spells it out as clearly as anywhere http://www.macosxhints.com/article.php?story=20071030153912813 (but a Google search will bring up several sites giving what is basically the same advice).
Its just a matter of copy and paste and your zencart site can be placed in Library/WebServer/Documents and you're ready to go. No changing the port number as this is the folder set at port 80 for serving webpages.

8 Jul 2008, 12:22 AM
#20
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: MAMP/XAMPP set up local host

Nick_H:

KHageman: What is the URL shown when you start MAMP up and go to the MAMP homepage? Is it http://localhost:8888/MAMP? If so, then type in http://localhost:8888 and you will see a directory listing of your MAMP sites folder, and you can click on your Zencart folder to load it :)

Ok, thanks. I followed this and got into the installation process. I'll be back with questions I'm sure.

Beth-katherine