[guide] Setting up WAMP w/Mysidia

Forum
Last Post
Threads / Messages

Kyttias

Super Moderator
Super Mod
Joined
Jan 26, 2014
Messages
849
Points
18
Mysidian Dollar
58,199
WARNING: LOTS OF IMAGES.
(And they are gifs.)

What is WAMP?
WAMP is short for Windows-Apache-MySQL-PHP and it's everything you need to turn your very own computer into a server that can host websites - like Mysidia! This is great news for developers who want free testing space before they go live with their projects and pay domain fees, etc. (There are Linux and Mac equivalents, as well as some more multi-platform alternatives - LAMP/MAMP/XAMPP - and if you choose to pursue them, you can still try to follow along with this tutorial.)​
Cool! How do I get it?
This part's easy. Head on over to WampServer.com (their site is also available in French and Russian, check the top right corner) and scroll down to the Downloads section. Before you choose a download, find out if your Windows is 32bit or 64bit (on Windows 8 / on Windows 7 / see related articles for others). My computer is 64bit, so I will choose this link:​
step1_by_kyttias-d8fp8kg.gif
Once it's done downloading, find the file. We're going to open it by right-clicking and hitting 'Run as Administrator'.​
step2_by_kyttias-d8fp8x9.gif
It's going to ask you what you want your default browser to be. You can go through the trouble of finding it, or not, the choice is yours. Immediately afterward it's going to ask Windows Firewall for permission. Leave just the first box checked, as this should be default.​
step3_by_kyttias-d8fp9el.gif
Hit next, and then finish. (If you're curious about SMTP, it has to do with sending out e-mails. If you'd like to configure this, read this article and follow it's steps later -- but it isn't a necessary component, so we'll be leaving the default values!)​
step4_by_kyttias-d8fp9ub.gif
Now what?
WAMP is now installed and should be running! Find it in the lower right hand corner (it may be hiding). Right-clicking on it brings up one menu, left-clicking brings up another. Pressing 'Put Online' will activate the server (the icon will change colors as it's working - if it's ever stuck on yellow, something is very wrong!). If the icon is hiding, go ahead and drag its butt out and sit it on the taskbar so you can get to it.​
step5_by_kyttias-d8fpaxq.gif
Tip: If WAMP has trouble starting (getting past the icon's yellow stage) now or ever, turn off Skype completely and then try turning WAMP on. They share the same default port, and Skype is smart enough to use a different one if its first choice is taken - so you can safely turn Skype back on once WAMP is on.
WAMP installed into C://wamp. Inside, there is a folder called www. This is where your site's files will be stored. It is safe to delete the contents! The folder must stay named www. You can either move the contents of Mysidia here (after unzipping, of course), or in a subfolder. For the purposes of this example, I won't be using a subfolder (there are benefits to using subfolders, such as ease of making multiple sites).​
step6_by_kyttias-d8fpbzr.gif
MySQL Database Setup
Just like you would using a real host, you need to create a database to use for you site. You can name it whatever you like - just remember what you name it. From the WAMP icon in the lower right, open up phpMyAdmin. Select the 'Databases' tab and create a new one right here.​
step7_by_kyttias-d8fpckt.gif
You're also going to need to set a password for the root user. The second tab at the top is SQL, and we're going to use it to run a command that will set the password. (Obviously replace yourpassword with an actual password for yourself, lol?) Put in:
Code:
SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');
Now, open up the C:\wamp\apps\phpmyadmin4.1.14 folder and then open up config.inc.php - if you open in Notepad, this is fine. Find this: $cfg['Servers'][$i]['password'] = ''; (you may need to set the search to 'Up' rather than the default 'Down' to locate it, you might not). In the empty single quotes, place in the same password you created above. For good measure, restart the server using the WAMP icon.​
step12_by_kyttias-d8fphwa.gif
Apache and Mod_Rewrite
Your site can be accessed by visiting http://localhost/ or http://127.0.0.1/ (or these and the name of your subfolder following the slash, if you have it in a subfolder) but not quite yet. Right now you're just going to get a 500 Internal Server error. See, Apache has modules - and on most webhosts, there are a handful of basic ones that are already turned on. But you're going to have to do that yourself! Our .htaccess file (included with the Mysidia files) is trying to access the Rewrite module - so we need to find it and enable it. Use the WAMP icon in the lower corner. You may need to scroll down to find it!​
step8_by_kyttias-d8fpdvc.gif
Rename Config
A new 'error' has taken the last one's place. Well, no, actually! In your Mysidia files, pop into the inc/ folder and rename config_adopts.php to merely config.php.​
step9_by_kyttias-d8fpept.gif
PHP.ini: Disabling Notices & Strict Standards
What?! More errors?! Also, no, haha. It's still just confused. Notices and, a similar warning, strict standards - are not errors, merely recommendations. Let's turn these off so we don't have to stare at them. Use the WAMP icon to open up your php.ini file, search for error_reporting = E_ALL and change the value to E_ALL & ~E_NOTICE & ~E_STRICT. You'll want to restart the server after saving these changes. Be patient and wait for the light to turn green again before proceeding.​
step10_by_kyttias-d8fpfro.gif
Installing Mysidia Adoptables
The only remaining error is that it can't find the database. This is because we haven't actually installed the Mysidia framework yet, silly! Now we're going to visit http://localhost/install and set up just as we would on a normal host. I hope you remember the name of your database and the password you set! The default user for MySQL is root. You must set the Domain field as 127.0.0.1 and you must log into your site using this address. Localhost will not work for this field. If you installed into a subfolder, put the folder into the script path. I zoom through the entire install, leaving many things at their default, but please read it and take your time!​
step11_by_kyttias-d8fpj67.gif
What's next?
That's all! This is all you need as a development environment. Always access your site with 127.0.0.1, not localhost - else you'll have issues logging in/staying logged in. So go ahead and bookmark 127.0.0.1. You could always open up C:\Windows\System32\drivers\etc and open the hosts file up in Notepad and add a line (after those already there, change nothing) like:
Code:
127.0.0.1       mysite.dev
^ And then you could type http://mysite.dev into the browser to access your site. But this only effects YOUR computer, and only ever will, not even others on your area network. If you know the LAN IP of your device, you could punch it in to other computers on your local/wifi network and also see your site. Set your IP to static, and you could even edit the hosts files on those computers to access your site with your special host ruled name - instead of rule with 127.0.0.1 it'd be with your static LAN IP. Get it?

If your router supports NAT Loop Back, you can easily do some port forwarding to allow others to access your site with your public IP. A variety of issues could get in the way of you sharing your site with friends outside of your local wifi network. Some can solved with a few simple steps, others may require you to buy a different router that supports NAT Loop Back, or if your ISP insists you use theirs, your only option is to find a different ISP. Sadly, I cannot guarantee sharing with others is possible, due to your router.

If you super want to give it a shot, start by port forwarding port 80, then sharing your public IP with a friend to see if it worked. If something's amiss, try disabling your computer's firewall to see if it's the culprit, or, it could be your ISP. This site will tell you if the outside world can't access a particular port on your computer.

If all goes well, you can use a service like no-ip.com to associate your public IP with a normal-looking url. You can stop giving your friends a hard to remember IP address! Public IP addresses change/refresh every couple of weeks, usually, because they're dynamic. You can call your ISP and ask for one that will never change, but they usually charge a monthly fee. However, the site I just mentioned can automatically look up your current public IP, so long as you have that site's nifty little Dynamic DNS Update Client program running, and always associate it with a url of your choosing - they have both free and paid options.

For good measure, you can also sync your WAMP www folder to a Dropbox account! It won't backup the database, you'll have to do that manually by exporting it, but it could definitely help you keep your files safe. You could even set up WAMP on various computers and use the same php files (however, each computer would be using its own copy of the database).​

AGAIN note:
If WAMP has trouble starting (getting past the icon's yellow stage) now or ever, turn off Skype completely and then try turning WAMP on. They share the same default port, and Skype is smart enough to use a different one if its first choice is taken - so you can safely turn Skype back on once WAMP is on.
 
Last edited:
I am sticking this thread since I believe it will be very useful. Many admins would prefer their sites closed for registration or public views at least after several weeks or even months. I think they sure can try installing WAMP first on their local PC, and get familiar with some basic concept before porting it to a live server.
 
Hey this guide was so helpful, thankyou, but I'm having a little bit of trouble. I'm wanting to test out mysidia and see if it's what I'm looking for for my project.

I run on a mac, so instead of using WAMP I decided to use XXAMP, which I already had installed (I use the netbeans IDE with it).

for the most part it's worked the same way, except that I was able to skip the Apache and Mod_Rewrite step of the guide (hope this isn't what is causing the problem because I honestly have no clue how to access the XXAMP equivalent of that step). I also had trouble with file permissions during installation. Everything is set to read only, so I had to make several files writeable in order to get around it (Like the gif and jpg and png folders, the config file obviously, etc.) I ended up setting the entire mysidia folder and all it's contents to writeable by everyone, to dodge any future errors related to this. (but I'm worried about security issues that my pop up later?)

Anyway, it's installed and when I go to 127.0.0.1/Mysidia/ I see all that I should, except that I am not able to log in (and therefore do anything beyond this point ^^).

When I attempt to log in, I receive this error:

759e2e9a97d2e0c39cccf9ef8d57845f.png


Any advice? I also receive this error upon trying to register a new user, so I can't do that either.
 
This has everything to do with mod_rewrite.

To enable this module it just takes a little tweak of your httpd.conf file which will be found in xampp\apache\conf. The conf file already contains the line needed to enable the module, but there is a comment mark (#) just before the code which means Apache will ignore the code. The line you are looking for is:

Code:
#LoadModule rewrite_module modules/mod_rewrite.so

In my httpd.conf file this is line 118, but it may vary so just search for "mod_rewrite" in the file. Now, simply remove the comment (#) from before the line, and save the file. You'll need to restart Apache for the changes to take affect, and you should now find you can use clean URLs with XAMPP.
 
Last edited:
Thanks for the fast response!

Unfortunately it doesn't solve my problem.

My xampp applications file tree is different, There's no xampp\apache\conf\httpd.conf.

the closest thing I've found is
XAMPP\xamppfiles\apache2\conf\httpd.conf

and the entirety of that files text is:
Code:
Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs"

<Directory "/Applications/XAMPP/xamppfiles/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

The file that seems to be identical to the one you're talking about is located at:
XAMPP\xamppfiles\etc\httpd.conf

I made the suggested changes there, an restarted apache as instructed, however there was no change in my error message.

I'm attempting to google this as well but so far I can't quite make heads or tails of the solutions i'm finding; they're all a little to vague for me to follow.
 
Last edited:
Hey, I'm still looking for a solution to think. In all my googling around, there's a lot of suggestions for editing an .htaccess file. I couldn't help but notice that the last three times I have downloaded a fresh copy of mysidia, none of them contained an .htaccess file. Is that the problem? could it be something else?

Please help x.x this is an extremely frustrating problem. all I want to do is work on my game, not waste hours messing around with apache and server errors.

Thank you for your attention!
 
It should definitely contain such a file. In many FTP uploading programs, you can't actually see this file. But since this is the WAMP thread, you should be working locally and it should definitely be there.
 
I am working locally; I just unzipped another fresh download of the mysidia script (Downloading the zip from Media fire of mysidia v1.3.4) to double check that I had not accidentally deleted or removed any files.

This is a screenshot of the entire contents of the freshly unzipped folder:

http://i.gyazo.com/b8fbf112287d332387786069e39d1d08.png
http://i.gyazo.com/23b2c85d9c9ba18d82a3aba2dec85492.png

As far as I can tell, all my permissions are set correctly and all files should be visible to me (I'm the root user of the computer)

Is there perhaps a link where I could download just the .htaccess file?
 
After squinting and seeing that you're on a Mac, I can now tell you all you need to do is simply unhide the file. Mac computers like to hide important system files. Because its formatted similarly (not having a real name, just as an extension) the OS assumes it's a system file and tries to keep it safe by hiding it. Here are two different sites explaining the same process for showing hidden files: [x] [x]

I've never owned a Mac, so it's not something I would have thought of. (On Windows, hidden files are a relatively common thing and are much easier to hide/unhide, but basically nothing comes hidden outside of the System file or a software installer automatically does it - files from the internet should never autohide themselves, that's ridiculous!) It's not surprising a Mac owner wouldn't have thought of this, either.

(As a note to not seeing changes after making edits in an earlier post - be aware that you must restart the server before changes can take place. If this means rebooting the entire computer because you can't figure out how, then that's what you'll have to do. I don't know how other setups work.)
 
Last edited:
Thank you so much for your patience. Honestly, I swear to god I have done those steps a dozen times before to show the hidden files, I assumed I would be able to view them. Apparently I was wrong. I must have at some point changed the settings back to regular view?

And I guess since I unzipped the file before moving it to my directory where I would be developing the site, it didn't move hidden files along with it.

I now no longer have that error, thank goodness. Thank you very much.

I'm now having a couple other problems but I'm going to leave it until tomorrow and try browsing the site and see if those questions have already been answered. Thank you very much for your help!
 
Hahah yeah, I upgraded my OS recently, so it makes sense that though I had enabled the view of hidden files it the past, it was now disabled. I seem to have gotten everything in great working order now! Im very excited to begin work on my game.
 
Thanks for sharing this! I got it up and running with no problems at all (except a little hiccup at the beginning where I entered something wrong >.>). I had been wondering if something like this was possible for a while, so I could test new features without breaking the whole site, but never found anything/couldn't figure out how to use things, so thanks! XD This is helpful!
 
Found a slight error, or problem, or whatever XD

When I copied all files and the database over so I affectively had a carbon copy of the site (but without the users, etc, and unneeded database entries on the one on my computer) I noticed that the images that stored links on my custom pages would still link to the real site (which is fair enough, seeing as that's what they were set to XD)

I then went into the images on the adopt page to change them and see if it worked, it kind of did. It changed the Protocol: http:// bit to <other> automatically when I put the whole address in (including the 127.etc, bit) but when accessing the link it would put pages/view/{page name} twice.... so I removed the pages/view bit and then it worked because it would put just the page name in the address bar (which works fine, and I don't care about that XD)

That leads up to the problem I'm having lol... IntoRain helped me a while ago now to make a 'get' page for adoptables I want people to be able to adopt, so that I can link them through images to the adoption page, and the link is get/id/{id number} but if I put just that into the link for the image, the address bar goes to pages/view/get/id/{id number}. That doesn't work though because the pages/view bit shouldn't be there XD I can't put the link in full though because it assumes that pages/view should be there. Do you know why? D: XD

Thanks :3

EDIT: Well, this is embarrassing XD I fixed it! It works now. I basically had to fiddle about with the settings of the Protocol: thingy and one of them worked XD Phew... XD
 
Last edited:
So I'm having an issue with not being able to log in despite putting the info in correctly. Is there any way to edit the log in info from the host thing to be able to log in?
 
Can you be a little more specific? If your admin password just isn't working, you'll have to remove all the tables added to MySQL and start over with visiting the Mysidia installation page. This is because, unfortunately, no you -cannot- edit log in information for an user, including yourself: passwords are encrypted with a hash, and you can't just put in plain text there, it has to run it back through to remove the encryption and it'd just get confused and fail if its been modified at all. You usually can edit information in the MySQL database, but not in this case.
 
Can you be a little more specific? If your admin password just isn't working, you'll have to remove all the tables added to MySQL and start over with visiting the Mysidia installation page. This is because, unfortunately, no you -cannot- edit log in information for an user, including yourself: passwords are encrypted with a hash, and you can't just put in plain text there, it has to run it back through to remove the encryption and it'd just get confused and fail if its been modified at all. You usually can edit information in the MySQL database, but not in this case.

The password is definitely not working. I tried already twice, the first time, and then I deleted everything and redid the installation and its still not working. I'll try one more time to reset everything.
 
The first admin password never works for me. I just create a second new user and go to phpMyAdmin and make it admin.
 
The first admin password never works for me. I just create a second new user and go to phpMyAdmin and make it admin.

I see. Yeah This is the third time I delete everything and try to log in with the admin account it asked me to make and it keeps telling me its not right. So I'll probably do that then because I thought at first it was I couldn't remember the password. So I deleted everything and tried it with a simpler password and it was still wrong. That's when I posted here. I then figured, maybe its the username, its got spaces, I'm a try one with no spaces. Still no go. So I'm a just do what you said and make a new account and make that admin.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top