WAMP & MAMP Questions

Taylor J

Fan
Joined
Mar 13, 2010
Messages
917
I'd try looking for a youtube tutorial or something. Currently on mobile and don't have the time to grab a good one for you atm.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
I'd try looking for a youtube tutorial or something. Currently on mobile and don't have the time to grab a good one for you atm.

I've done tons of internet research (You-Tube and otherwise)...I usually do that before posting on forums. As can be seen...this thread is over 2 weeks old...and I've been devoting a portion of each day trying to figure this out. This is actually the 2nd or 3rd time I've tried to get MAMP setup successfully over the past 12 months+. Getting kind of burned-out trying to find the solution.

I may have missed something...thus if someone finds something good...I would love to hear about it.

It's very possible I'm doing something wrong that's not normally covered in You-Tube videos or internet DIY's. That's why I've tried to include lots of screenshots in case someone can spot something obvious that I'm missing.

Thanks:)
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
Are you sure your database is actually imported into the Mamp setup? If it is, you should be able to use phpmyadmin to see the tables and the data in them. If you just dumped the sql file into the db folder, that won't do it. If you're running into the 32M file limit, just edit php.ini in Mamp (should be a php folder there) and set uploads to something larger than your import file.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
Are you sure your database is actually imported into the Mamp setup? If it is, you should be able to use phpmyadmin to see the tables and the data in them.

Yes I confirmed this...I can see the tables & data in phpMyAdmin for the imported database.

If you're running into the 32M file limit, just edit php.ini in Mamp (should be a php folder there) and set uploads to something larger than your import file.

In my internet searches I did come across this adjustment for the phpMyAdmin for modifying the max database import size. Unfortunately it was also mentioned that for databases larger than 100+ megabytes...this fix doesn't always work (phpMyAdmin will give an error). But either way...I was able to import the databse with Terminal.

Now that the database seems to be imported properly...I'm starting to think either I:

- Have a setting not correct (maybe wrong localhost port). I left everything at the default setting...right now it's port 8888.
- Or something is not correct with my website html & PHP files in the htdocs folder. I copied everything from my severs public_html folder...into the MAMP htdocs folder...but all I get when I click on the MAMP "My Website" link...is a blank white browser page.

When I look at some Youtube videos on MAMP...some of them at least see an "Index of /" message on the browser page. In this video...if you skip to 2:45 point in the video...you can see what I mean:




The guy doing this video also changed his MAMP port settings from 8888 to 80 (1:27 of the video)...but I don't think this should effect my setup if I leave it at the default 8888 setting.

So I'm thinking something may be up with my site files in the MAMP htdocs folder (maybe some important files from my server are missing to make things work).

Any suggestions greatly appreciated.

Thanks

p.s. I noticed that all of the files/folders from my servers public_html directory that have a period (.) in front of their names are not included when I get a full backup of my site. And the htaccess file (which is normally .htaccess) in my MAMP htdocs folder has no dot (.) in front of it...and I can't rename it with a dot (.)...since when I try this...the computer OS gives me the error..."can't use a name that begins with a dot "." because these names are reserved for the system".
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
Two things you can look at. First make sure your Mamp setup is working. Make a simple "Hello World" index.html file and put it in your document root (don't overwrite your site index file - you can name it something else instead) and point your browser to it. If it shows up, great. If not, you can start looking at your configuration, though it ought to work straight out of the box.

Second, check the config file in the site software you're using. Make sure the database name, password, and location match Mamp. Also check the site path and url to make sure they match your local setup.

You may also have to change the url of your site in the database. There should be a table with "settings","config", "admin" or something similar in the name. It will contain the site url and maybe the site path which you can edit to reflect your Mamp setup.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
Make a simple "Hello World" index.html file and put it in your document root (don't overwrite your site index file - you can name it something else instead) and point your browser to it. If it shows up, great. If not, you can start looking at your configuration, though it ought to work straight out of the box.

Great idea!:) I did this (create a "Hello World" index.html file)...placed it into the MAMP htdocs folder...then clicked on the MAMP "My Website" browser page link/button...and BAMM..."Hello World!" was displayed!:)

I should mention that my website directories don't have index.html files...but do have index.php files. Maybe this is a vBulletin thing (site is running vBulletin 4.2.5). Thus there was no risk of over-writing an existing index.html file.

Could this possibly be a reason I'm not seeing my site in MAMP?

Thanks
 

Taylor J

Fan
Joined
Mar 13, 2010
Messages
917
Pigoo No Index.php is fine and apache pulls it just like a .html file. Do the other process that Nev_Dull descirbed and check your vBulletins configuration file to make sure all the paths line up with how they are now supposed to with MAMP.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
No Index.php is fine and apache pulls it just like a .html file.

Good deal...great to know.

Do the other process that Nev_Dull descirbed and check your vBulletins configuration file to make sure all the paths line up with how they are now supposed to with MAMP.

I was a bit unsure how to do this...thus haven't tackled it yet.

- In the database "setting" table...the website URL is mentioned in a couple locations. One of them is the varname "homeurl"...and a 2nd place is the varname "bburl". Which one of these do I change...or do I change both? And what should I change it to...to work with MAMP locally?

- As far as the config file in the site software (vBulletin in this case). Is this most likely a php file on the server that needs to be modified? I'm guessing it may be the config.php file.

- Regarding: "Make sure the database name, password, and location match Mamp. Also check the site path and url to make sure they match your local setup." Are these all within MAMP?

Apologies for so many questions & for being so cautious. Just want to be 100% sure I understand what I'm doing...and not mess things up. Especially if it's something that may not be reversible.

Thanks for all the help!:)
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
Yes, you're only looking at the files that are in your Mamp setup. All these should be copies of your real site, so don't worry about making mistakes. You can also backup any files before making changes (e.g., before changing a config.php, copy it to config.php.BAK) Your database is also a copy, so if something goes wrong, you just replace it with another copy. That's the nice thing about working in a virtual setup, you can fiddle with impunity.

And yes, if there are multiple places in the database table that shows the path or url, change them all to your Mamp setup (http://localhost:8888) The path should be something like "/Applications/MAMP/htdocs" from what I remember. I think you can check that in your Mamp preferences.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
Yes, you're only looking at the files that are in your Mamp setup. All these should be copies of your real site, so don't worry about making mistakes. You can also backup any files before making changes (e.g., before changing a config.php, copy it to config.php.BAK) Your database is also a copy, so if something goes wrong, you just replace it with another copy. That's the nice thing about working in a virtual setup, you can fiddle with impunity.

I'm pretty good about this. Sometimes I'm making changes on the live site...so I'm super careful to always make backups before making any changes. Then if I mess up...I can use the backup file to restore things.

I don't like working on the live site this way...I'm sure many others would agree. Which is why I'm spending so much effort trying to get this MAMP setup operational.

It really shouldn't be this difficult to setup a local server environment (novice or expert)...but it sure as heck seems to be!;)

And yes, if there are multiple places in the database table that shows the path or url, change them all to your Mamp setup (http://localhost:8888) The path should be something like "/Applications/MAMP/htdocs" from what I remember. I think you can check that in your Mamp preferences.

Thanks a bunch I will do this...and see if it does the trick. Trying to tackle this setup one step at a time...hopefully slowly eliminating one hurdle at a time.:)
 

Taylor J

Fan
Joined
Mar 13, 2010
Messages
917
If we haven't figured this out by the time I purchase my first Macbook Pro here in the next week or two (hopefully) I'll try to create a full on video tutorial for you lol
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
If we haven't figured this out by the time I purchase my first Macbook Pro here in the next week or two (hopefully) I'll try to create a full on video tutorial for you lol

Wow...that would be super awesome & excellent!!! I'm sure there are others that are in the same-boat as me. Could make a great You-Tube video to upload!:)
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
And yes, if there are multiple places in the database table that shows the path or url, change them all to your Mamp setup (http://localhost:8888) The path should be something like "/Applications/MAMP/htdocs" from what I remember. I think you can check that in your Mamp preferences.

Update: Changed both of the location's in the database where the website URL is listed to http://localhost:8888 ...but no luck. All I get is the "Hello World" message from the test index.html file that was created recently (suggested earlier in this thread).

Here's another thought. In the root directory of the MAMP htdocs folder (same place as the "Hello World" test index.html file)...there's a maintenance.html file. If I manually type in localhost:8888/maintenance.html I'm able to view this file.

The actual forum files for the website are located in a "forums" sub-directory (htdocs >> forums)...not the root directory.

In this "forums" sub-directory I have a "faq.html" file. If I manually type in the URL field localhost:8888/forums/faq.html...I get the message "Forbidden You don't have permission to access /forums/faq.html on this server." I don't know why this is...maybe I need to modify a setting.

I thought I would try changing the default "Document Root" path in MAMP preferences from the default setting of "/Applications/MAMP/htdocs"...to "/Applications/MAMP/htdocs/forums". I made the change...stopped the server...quit MAMP...then restarted MAMP.

When trying to view the website with this new Document Root path...I still get the message "Forbidden You don't have permission to access /forums/faq.html on this server."

I guess the question is...why am I able to view the root directory of the MAMP htdocs folder...but cannot view the sub-directory "forums" (htdocs/forums)...and get the "Forbidden" message?

Thanks


A couple screenshots to show what I'm talking about with the MAMP Preferences:

Default setting:

web server 1.png


Modified Setting:

web server 2.png
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
Did you change the urls in the database to point to where the actual forum is (i.e., in the 'forums' subdir)?

Otherwise, there should be no reason you can't view files inside the forums folder, unless there's a problem with the database.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
The URL's I changed were in the database table named "setting"...and within the "setting" table the two "varname" that I found with a URL in them were the "homeurl" and "bburl" varnames.

With these two URL changes...I tried the following permutation's for both of the "varnames" (homeurl & bburl):

http://localhost:8888
localhost:8888
http://localhost:8888/forums
localhost:8888/forums

What I don't know is if I need to change both of these URL's or just one of them. Or if I need to change both...or maybe only one needs the "forums" sub-directory added...and the other does not.

I also dont know if there's a 3rd (or more) database location that needs to be changed to get things to work.

I will try changing them again...and see if I can get something to work.

Thanks for all the help...and thanks for sticking with me on this!:)
 

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
I just don't know why it's giving you so much trouble.

I decided to give it a go myself, so downloaded Mamp again yesterday. I dropped an old copy of my forum files into htdocs and used Mamp's phpMyAdmin to import an old backup. I changed the database username and password in the forum config file to the default Mamp ones, logged into the forum admin page options and changed the forum url to localhost:8888, turned off friendly urls so I could see what's what and it works. This is a XF forum, but it should work the same for yours.
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
I just don't know why it's giving you so much trouble.

Lol...me too. But then this is basically my first time trying to get MAMP to work (actually my 3rd time...with 2 failed prior attempts)...and maybe (just maybe)...there are some "oddities" with the site setup (although not sure what this would be).

Maybe I'm going thru a steep learning curve with this being my first MAMP setup.

* I changed the database username and password in the forum config file to the default Mamp ones...
* logged into the forum admin page options and changed the forum url to localhost:8888

Did we discuss these two things for my setup previously in this thread (or maybe I didn't get to them yet)? I didn't do any modifying of the forum config file yet (I guess I wanted to do one thing at a time...and modify the database URL items first...to see if this helped things work). Then if not...move onto the forum config file modifying.

What is the MAMP default database username and password (is it "root" and "root")?

Great to hear it was so easy to get your MAMP setup working. I bet if you were here to help in person...you'ld probably have things working in 5 minutes or less!:)

Trying to think positively...maybe I'm only a couple settings away from getting things working here too.:)

Thanks
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
Tried different combinations of localhost:8888 & localhost:8888/forums in the database varnames "bburl" and "homeurl"...and still no luck.

Then thought maybe the database is in the wrong MAMP directory...or maybe one or more of the MAMP Preference settings is not correct.

Screenshot of where database is located (within the MAMP folder):

db folder.png

MAMP Preference Settings from each Preference Tab ((I think everything is default except PHP version):

* Ports:

Apache Port = 8888
Nginx Port = 8888
MySQL Port = 8889

Would be great to hear if something mentioned was not correct...and changing it would get things operational!:)

Thanks
 
Last edited:

Nev_Dull

Anachronism
Joined
Apr 27, 2010
Messages
2,376
Did we discuss these two things for my setup previously in this thread (or maybe I didn't get to them yet)? I didn't do any modifying of the forum config file yet (I guess I wanted to do one thing at a time...and modify the database URL items first...to see if this helped things work).
Yes we did. Basically you need to make sure all the parts are in alignment with each other. So, you need to:
set the Mamp document root to htdocs/forums
set the url in those locations in the database to http://localhost:8888 (because "forums" is your document root)
set up the forum config file with the correct paths to the forum and forum database, as well as the database connection info (username: root password: root).
 

Pigoo

Enthusiast
Joined
Aug 20, 2018
Messages
247
Basically you need to make sure all the parts are in alignment with each other. So, you need to:
set the Mamp document root to htdocs/forums...

This I can do.

...set the url in those locations in the database to http://localhost:8888 (because "forums" is your document root)...

This I can do.

1: set up the forum config file with the correct paths to the forum and forum database...
2: as well as the database connection info (username: root password: root).

These 2 items I'm less sure what to do. I've looked at the config.php file...and I'm not 100% sure what to do for these 2 items.

Thanks
 
Top