WAMP & MAMP Questions

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
Apologies if this isn't the best place for this thread...wasn't 100% sure where it should go.

I want to install WAMP/MAMP (technically MAMP since I'll be on a Mac)...so I can work on my site locally. I've read thru the how to install MAMP & get it running documentatin...now I'm ready to get my website involved.

I've read thru all of the included documentation for MAMP...and I'm not feeling like I understand how things work. I've tried to do this previously...and don't think I got things working properly. So now I'm asking the experts how to do things...so I get it right.:)

Now that MAMP is installed & running..I'm kind of stuck/confused on how exactly do I:

1. Get my website working with MAMP locally?
2. I have backups of my website...do I move these files into the proper directory MAMP creates upon installation?
3. What about the website database...how do I get my websites database working with MAMP?
4. Very important...how do I know 100%...that I'm working on my site locally...and not working on the live site?

I'm 100% new at this...thus the confusion. I'm sure after I get things working the first time...it will make a lot of sense.:)

Thanks

p.s. On the other hand...if there's an easier/simpler way of working on my site locally (rather than MAMP)...I would be open to those suggestions as well.
 

overcast

Adherent
Joined
Mar 17, 2019
Messages
485
On Windows we make use of Laragon WAMP. And I just copy the final made website to the live site later.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
On Windows we make use of Laragon WAMP. And I just copy the final made website to the live site later.

That sounds great...I'm looking for help on how to get the website running locally within WAMP or MAMP so I can work on it locally.

Thanks
 

Ryan Ashbrook

IPS Developer
Joined
Jan 26, 2004
Messages
3,571
Your mileage may vary, depending on the software you use, but it is effectively the same as moving from one server to another.


Again, I would consult with the manuals / support for the specific software you use, but the general process is largely the same regardless of software.
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,766
What is the purpose of running your site locally? If you just want to play with it, fine. However, if you want to mirror what your live site is like, you might want to look at a commercial virtualization product like VM Fusion or Parallels for your Mac. (There's also the free VirtualBox, but it requires a little more technical knowledge). These will allow you to set up an environment that just like your actual hosting environment and lets you interact with your local site the same way you would with the live one.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
What is the purpose of running your site locally?

I want to make some changes to the site (do some development work). This is the better way of doing this sort of thing...since working on the live site can be risky.

However, if you want to mirror what your live site is like, you might want to look at a commercial virtualization product like VM Fusion or Parallels for your Mac. (There's also the free VirtualBox, but it requires a little more technical knowledge). These will allow you to set up an environment that just like your actual hosting environment and lets you interact with your local site the same way you would with the live one.

I'm VERY familiar with these products. These products (VM Fusion or Parallels for your Mac) are actually solutions for running a Windows environment (Windows shell environment) on the macOS (allow a user to run Windows software on an Apple computer). This is not related to what I want to do.

Thanks
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,766
Actually, they aren't just for running Windoze on the Mac (though they are often marketed that way). Example: I have a Mac Mini currently running three linux servers (2 CentOS, 1 Fedora) under VMWare that I use for site development and testing. Each mirrors the specific setup of a client's site. In the VM library, I have five or six other instances for client sites that I can switch on and off as needed. I find it much more versatile than a WAMP or MAMP setup, but again, it depends on your needs.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
The reason why I mentioned running Windows on a Mac via VMWare or Parallels...is because 95%-99% or more of VMWare or Parallels users use these products to run Windows on their Mac's...with only a VERY small proportion running non-Windows OS's via VMWare or Parallels. Practically nothing in this world is 100%...and in this case...you're in the small group that uses VMWare for a non Window's OS.:)

It sounds like you have some previous experience with WAMP/MAMP...how about giving me a hand getting MAMP to work on my Mac locally.:) I'm probably doing something really simple wrong...like not putting my site files (HTML, PHP...and databases) in the correct MAMP folder/directory...or maybe my MAMP Preference settings aren't correct (port settings for example). Thanks.:)
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
The reason why I mentioned running Windows on a Mac via VMWare or Parallels...is because 95%-99% or more of VMWare or Parallels users use these products to run Windows on their Mac's...with only a VERY small proportion running non-Windows OS's via VMWare or Parallels. Practically nothing in this world is 100%...and in this case...looks like you're in the small group that uses VMWare for a non Window's OS.:)

It sounds like you have some previous experience with WAMP/MAMP...how about giving me a hand getting MAMP to work on my Mac locally.:) I'm probably doing something really simple wrong...like not putting my site files (HTML, PHP...and databases) in the correct MAMP folder/directory...or maybe my MAMP Preference settings aren't correct (port settings for example). Thanks.:)
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,766
It's been a long time since I've played with Mamps, but it should be pretty much the same. Start up the server, put your website files into the htdocs folder Mamps creates, and point your browser to the local page (should be: http://localhost:8888(or whatever port you chose)/[your index page])

For your database, first you'll have to create a user and blank database. For that, you use phpMyAdmin, which you get to by http://localhost:8888/phpmyadmin (again, adjust to your port settings). Use the tools in phpMyAdmin to import your saved database files and you should be fine.

As long as you're pointing at localhost, you're on your local site.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
Hey Nev_Dull...super Awesome...thanks for help!:)

Yes I agree...if you haven't messed with MAMP in a while...I bet not much has changed since you last used it. I tried setting up a local server with MAMP version 4.x a while back (unsuccessfully):(...and now MAMP is on version 5.7. I think the user interface/graphics is a bit different (eye candy)...but I'm betting the "nuts & bolts" under the hood is very similar.

Looking at what you mentioned:

- I've put all the website html & PHP files into the MAMP htdocs folder (exactly how they appear on my live websites server).
- Regarding the database...I haven't done what you mentioned about using phpMyAdmin to create a user and blank database...and import my sites saved database. I will have to give this a shot.

What I've done so far (previously). I've done what you mentioned...enter my website URL into:


...and all I get is the "Not Found" page from my browser. Maybe this is due to the database setup not being correct (yet)...or maybe there's something else I'm not doing correctly.

I'm sure once I understand how to do this the first time...it will be totally logical whenever I do it in the future. It would really help if the MAMP download came with more detailed setup instructions...especially for us first-timers.

Thanks again.:)

p.s. I should also mention in case it's important...the MAMP install automatically defaults to PHP 7.2. My website is running vBulletin 4.2.5 (which I believe is only compatible to PHP 7.0). But regardless of that...I know some parts of my website do not like PHP 7.0 (maybe due to older plugins or add-ons of some sort)...thus I have PHP 5.6.40 running for my MAMP local server setup.
 

Taylor J

Fan
Joined
Mar 13, 2010
Messages
985
If MAMP works the same way as XAMPP then you don't do http://localhost:8888/www.example.com....

You do /whateveryounamedthefolder

If you have to use ports do localhost:8888/foldername

If you don't have to use ports do localhost/foldername

Not sure about the ports or not, haven't ever used a mac but hopefully that will change in the following months when I'm able to purchase a macbook pro.
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,766
The 404 error will be because you are trying to go to your domain. Try http://localhost:8888/ instead. That should take you to your forum's index page.

Edit: Oops. Taylor J got in there while I was typing. He's right, if you have your site in a folder inside the htdocs folder, you need to include the folder name in the path.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
Thanks very much guys...will do some setup testing ASAP...and post results.
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
I attempted to create a database with phpMyAdmin (named "test")...and I think I did this successfully (not 100% sure). Then tried to import my websites database and got a phpMyAdmin - Error (Incorrect format parameter).

What I did was:

- Clicked on the phpMyAdmin "Import" tab.
- Left all phpMyAdmin settings set at default.
- Clicked on the "Choose File" button.
- Selected the database file for my website.
- Clicked the "Go" button.
- About 2 minutes later I get a phpMyAdmin - Error (Incorrect format parameter).

In case this helps...the database file I'm importing has the format (example_forum.sql)...and the "File Kind" is "PlainTextType".

Not sure what I'm doing wrong...or maybe there's a phpMYAdmin setting I need to change from the default settings.

Any pointers or things to try greaty appreciated.

Thanks


Screenshots:

phpMyAdmin import 2.png

Error Message:

phpMyAdmin error.png
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,766
I'd guess your import file is corrupted or incorrect. On your Mac, it should have the kind "Structured Query Language File".
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
I see.:(

The process by which I get my websites database is:

- I take a full backup of my website via cPanel on my server (see screenshot below).
- I download the compressed full backup file via FTP.
- Compressed full website backup file is in the format backup-4.3.2020.tar.gz
- I double-click this file to decompress it.

The resulting database file I get is in the format example_forum.sql (with the .sql extension). And when I do a right-click & get info on this .sql file...it says Kind: PlainTextType.

If the database file is supposed to be Structured Query Language File...I'm not really sure why it's coming in the PlainTextType format via the full website backup I'm getting.


cPanel.png
 

Taylor J

Fan
Joined
Mar 13, 2010
Messages
985
Now see the backup from cpanel may be more than just your datatbase. In cPanel click on the phpmyadmin link and download a backup directly from your web servers phpmyadmin instance
 

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
Thanks for the idea to just download the database itself from phpmyadmin...I will give it a try.

Do you agree that when I do a right-click & get info on the database files I have...that the file type it's saying (PlainTextType) is not the correct file type to use for a phpmyadmin import?

Thanks:)

p.s. I should have mentioned that when I decompress the single large .tar.gz full website backup file...it definitely has a seperate stand alone database file. But for some reason...the file type is "PlainTextType".
 
Last edited:

Pigoo

Adherent
Joined
Aug 20, 2018
Messages
250
Update: Still working on getting local server environment via MAMP operational.

Turns out the database file I downloaded from my server (example_forum.sql) was the proper file. The problem was...importing this file into phpMyAdmin directly was not possible due to the phpMyAdmin max file size limit of 32 MiB (approx 32 megabytes). For databases larger than 32 MiB...using the Apple "Terminal" app was the way to go. As far as I can tell...my sites database has now been imported into phpMyAdmin properly.

Current situation is...still no operational local server environment with MAMP. Here are the extremely brief instructions included with MAMP via a "Read Me" file:

README for MAMP 5.x

- Put your HTML and PHP files into the htdocs folder!
- Database files are stored in the folder db/mysql or db/sqlite.
- PHP errors are logged in the file logs/php_error.log. If you doubleclick the logfile, the consolewill be open, which shows the last errors.


At this point my website HTML & PHP files are in the htdocs folder...and the database files are in the db/mysql57 folder (see screenshot).

As far as I understand...this is where the database files are supposed to be...but maybe they're actually not in the correct location.

Also...when I click on the MAMP "My Website" link (see screenshot)...it opens a new browser window with the URL localhost:8888...but the page is blank (the local version of my website via MAMP does not show up).

Not sure what I still need to do to get things working.

Thanks


MAMP DB dir.png


MAMP.png
 
Top