This will detail my attempt at installing Wampserver on my laptop running Windows Vista Home Premium. For this install I used Wampserver (32 bits & PHP 5.4) 2.4…
Recently I got into php coding and really coding in general again. I had taken a hiatus from it after completing a few projects in asp.net…..
Finally I think I have given up on Microsoft languages. I am sure they are great for those who are really advanced but I found them quite limiting. I had a choice to move on past asp.net (I think there is now MVC… maybe something else) or switch and I chose to jump to the php side. Thus far, I have no regrets…
The same thing that made asp.net “easy” also limited it. The premade objects were great until you wanted to change them. Then you would run into all types of problems. I also found the visual programming suite a bit quirky.
Anyway, PHP, WAMP, and WordPress…. What a great marriage….
So I decided to set it up and here I will describe what happen to me. The errors I encountered and how I solved them because this setup can be quirky and it seems like many different people are having many different problems… Like this guy who somehow magically figured out that his Apache httpd.conf was missing a final ‘/’ at the end of one of his lines…. WTF.. He lists another article about problems with Wampserver setup that I didn’t bother to read but should have…. Quirky…. Here was my ordeal…
1. Watched this Video
It’s a good video… short.. to the point… describes a few common pitfalls I will talk about later… but the guy speaks to you as if you have never heard of a computer before so I think it would be great for a real beginner.
2. After the Video, Download
After watching the video I downloaded Wampserver from the site:
Wampserver English Homepage
3. Skype… Turn it off
The video talks about an error with Skype. Wampserver is going to use port 80 on your computer and that is also sometimes used by Skype. Sometimes wamp will work if started while skype is running but usually skype will cause problems with wamp. Thus, you need to turn off Skype(all programs really) when you install the server. Then you should try to always start skype after starting Wampserver so there are no conflicts. There are ways to change ports but I have not experimented with those yet. To be on the safe side, I opened Skype and checked this option so that I know Skype won’t use port 80. This error is widely discussed in many places like here >> Skype issue yet again foils Wampserver and here and I am sure I could list more.
(Spoiler: I had problems getting wampserver setup initially and ended up turning off port 80 in Skype for a different reason. It didn’t solve the problem I was having but I think it is wise to to this anyway that way you eliminate a potential problem.)
This went pretty smoothly. Just a few questions to answer. How is the mail setup?? I just left in the default settings as I am not interested in getting this to work at this time… Apparently from some things I read this mail feature is not easy to setup on a local machine. The next was regarding Windows Firewall. I said it should allow Wampserver to do as it pleases. BOOM… It was installed…
5. The Orange Light of Doom
The wampserver icon showed up in my tray but it didn’t turn happy green like it was supposed to. It was a beautifully horrifying orange. Because, like I said, I had worked with the Microsoft Visual Studio, I know setting up these things can be frustrating so I was not too surprised at the Orange light. In fact, I was expecting the setup to be difficult.
6. How to Change the Wampserver Orange Icon to Beautiful Green…
So I went to the net to see what the heck the problem was. In hind sight I should have immediately checked the error logs for both Apache and mysql first. I would guess that many have some kind of issue with one of these two not working. You can see the log by simply going to:
Apache >> Apache Error Log
MySQL >> MySQL Log
I would post a screen shot but the Wampserver menu kept closing when I hit the alt key to take a screenshot of it…. ha
Anyway, I went through to make sure I did what the video said. I tested localhost and it worked. I made a test.html and it worked. Everything appeared to be working but still that damn orange light.
Finally I looked at those error logs and noticed that the MySQL Log said:
2013-09-12 15:04:34 5496 [Note] Server hostname (bind-address): ‘*'; port: 3306
2013-09-12 15:04:34 5496 [Note] IPv6 is available.
2013-09-12 15:04:34 5496 [Note] – ‘::’ resolves to ‘::';
2013-09-12 15:04:34 5496 [Note] Server socket created on IP: ‘::’.
2013-09-12 15:04:34 5496 [ERROR] Can’t start server: Bind on TCP/IP port: No error
2013-09-12 15:04:34 5496 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2013-09-12 15:04:34 5496 [ERROR] Aborting
So obviously port 3306 was having problems. I was ok with port 80 for Apache because I stopped Skype but port 3306 had something stopping my Wampserver MySQL. ughhh….
I confirmed this by running netstat -a from command line….. Here is an article talking about how you can see the different ports on your computer and what they are doing.(apparently this good only on local machines)
I thought it might be because I had MSSQL installed on my computer before so I went to:
Control Panel >> Programs and Features
Then I deleted all my old Microsoft development junk.(MSSQL and some other stuff) That made me feel good but did not fix the problem.
I thought it might be the Windows Firewall for some reason. So I set up an exception for my mysql service. There are different ways of getting there but basically:
Control Panel >> Windows Firewall >> Allow a program through Windows Firewall >> Exceptions
Then I added an exception for both the MySQL program file and the port(3306 at this point).
I found the name of the MySQL file by looking in my wamp folder at:
I believe I got this idea from something I had been reading and they directed me to this place and the file name… Oh here it is… Tons of tips for tackling issues with Wampserver Installations
That didn’t work by itself but would become a part of the puzzle that finally did work… I needed to change the port for MySQL from 3306 to 3307. So I edited the one above firewall exceptions to 3307 instead. One exception for port 3307 and one for my MySQL file located in the address(wamp/bin/mysql/mysql5.6.2/bin).
Next I needed to change the port for the MySQL service… This article was helpful and it talks about changing ports for both Apache and MySQL so Wampserver will run smoothly. I tried this but it didn’t work for me. I decided to focus on just the MySQL instead since the Apache seemed fine.
It turns out changing this port is really not that hard. Click on the Wampserver icon and go to:
MySQL >> my.ini
In my version of this file I found three places to change 3306 to 3307… Here is a bit of what it looked like:
port = 3307
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
port = 3307
socket = /tmp/mysql.sock
But there was one more place at the bottom of the document. The # tags in this document are just comments…
I believe I restarted everything and the icon turned green…. I was quite happy about that!!!
Final Issue with phpMyAdmin
After it turned green naturally I wanted to test out my new toy so I went to phpMyAdmin but was greeted with a login screen. I had no password or ID. What was this? Some searching led me to discover that phpMyAdmin sets root as the username/ID and a null(no) password by default. This article does a good job of discussing how to change your password for phpMyAdmin. Great so root, no password, and enter…. NO…. I got this:
#1045 Cannot log in to the MySQL server
I am not sure why but root and no password did not work for me so in order to login to phpMyAdmin I had to make some changes. I tried changing my password using the MySQL Console at:
Wampserver Icon >> MySQL >> MySQL Console
This link describes changing your password well.
the command is:
SET PASSWORD FOR root@localhost=PASSWORD(‘Enter Your Password here’);
I changed my password to root but still it would not let me login…
I went to:
and opened the file:
This process of changing the password for phpMyAdmin was discussed here. The one guy gave a different set of instructions so phpMyAdmin asks for login info in a popup. It worked for me too but I decided if that worked then I could certainly get the original login form to work.
Here is what I had in my config.inc file:
/* Authentication type */
$cfg[‘Servers’][$i][‘auth_type’] = ‘cookie';
/* Server parameters */
$cfg[‘Servers’][$i][‘host’] = ‘localhost';
$cfg[‘Servers’][$i][‘port’] = ‘3307’; //added this
$cfg[‘Servers’][$i][‘password’] = ‘root'; //added this
$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp';
$cfg[‘Servers’][$i][‘compress’] = false;
/* Select mysql if your server does not have mysqli */
$cfg[‘Servers’][$i][‘extension’] = ‘mysql';
$cfg[‘Servers’][$i][‘AllowNoPassword’] = false;
I believe ya it was a bit different when it was originally installed through the Wampserver installation package but I can’t recall what all I changed. Since I changed my password in the MySQL Console as described above I had to set AllowNoPassword to false and give my password. I am not sure what else I added if anything.
That worked for me… Hope it helps someone else….