Unable to login to localhost

I am just starting to learn PHP and have bought the “Build your own database driven website using PHP & MySQL” book.

I have installed WAMPServer as instucted in chapter 1 (PC running Windows XP Pro). However, when I try to connect to localhost I am prompted for a Username and Password. I have tried entering my Windows login details but they are not accepted. How do I find the Username and Password?

Thanks,

Steve

By default WAMP has no authentication set unless your connecting to the database which you connect with root and no password. Try un-installing WAMP, delete the entire directory and re-install it.

If that does not work the next thing to try is shutting down programs which may be causing a conflict with WAMP.

Searching for “WAMP Server username and password” on Google it comes up with 2,740,000 results.

Looking at the first couple of results it looks like you need your Mysql username and password.
You might as well do the same as I did and read the results there rather than repost it all here.

Although there are results WAMP doesn’t use any type of authentication unless your connecting to a database like i stated. I use WAMP for my localhost server and have never been asked for a username/password to access http://localhost

Can you provide us with a little more information?
Did you type http://localhost in your browser address window? Is that what prompted the password? Is the password prompt on a page or a pop-up box?
If you are trying to connect to http://localhost/phpmyadmin you shouldn’t need a password.
Try some troubleshooting. Create a file and name it

phpinfo.php.

Place this code in the file.

<? phpinfo(); ?>

Save the file to the www folder under your wamp directory.
In your browser window enter

localhost/phpinfo.php.

This should bring up a file that has all of your server info on it. If you can’t get that file to come up you have some other issue.
If it does come up then go back to the original form asking for a user name and password. Enter root for the username and leave the password blank. Good luck and come back and let us know how it worked out.

I assumed he is using Mysql:

I am just starting to learn PHP and have bought the “Build your own database driven website using PHP & MySQL” book.

I said:

Looking at the first couple of results it looks like you need your Mysql username and password.

But hey why bother searching for an answer lets just post a question.

Im not saying you were wrong to post the link Rubble but from the way he worded his thread it didn’t sound like a MySQL login issue

Thanks for all the help so far. I have uninstalled and reinstalled WAMP 2.1 without success.

I have started up WAMP 2.1 and it is running on the taskbar. I select “Localhost” from the menu and a new Firefox Browser window opens prompting me for the Username and Password. I haven’t got as far as installing MySQL yet, just WAMPserver.

I followed your instructions Tsalagi with the info.php file and got a 404 File not found error.

When setting up WAMP the only options I am prompted for are the install location and the SMTP and Email values. I have tried enterring “localhost” and my email POP3 SMTP address for the SMTP value but either way I get the prompt for username and password to login.

Steve

MySQL installs with WAMP. No need to have an additional install.

I followed your instructions Tsalagi with the info.php file and got a 404 File not found error.

I’m not sure, but in XP try going to your Windows start button. Click on RUN and type in IIS. If your admin panel for Internet Information Server comes up, look for the stop button on the upper left corner. Close the admin panel. Click on the WAMP icon and restart all services and try accessing localhost again.

Typing “IIS” at the cmd prompt is not recognised.

Steve

Not at the command prompt. Sorry for the miss-info.
Right-Click on My Computer and choose MANAGE. Then open up the Services And Applications tree item and the bottom one should be Internet Information Service. Try that.

OK, IIS tree is there. The default website and FTP sites are both running.

Steve

Click on stop in the IIS admin panel and restart the WAMP server.

OK, stopped both the default website and ftp servers and now WAMPserver is online. Selected Localhost from the menu and got the Server configuration as shown in the book.

So, it looks like it is working OK now. Does this mean that IIS and WAMPserver cannot run at the same time?

Steve

Yes, IIS is a server so having it running along side WAMP will cause port conflicts and services conflicts.

That is correct. IIS must be stopped before WAMP. I believe there are some configuration steps you can take to make IIS work. Something to do with port 80 but I may be mistaken. I don’t fool with IIS yet. You can change your windows settings to not start IIS or just stop it every time you boot your machine.
Glad you are on your way. Good luck

Thanks everyone for your help. A happy New Year to all :slight_smile:

Steve