Hi,
I use wampserver (or vertrogo serv) and installed in c:\wamp. I have a file called test.php in c:\wamp\www\test.php. When type http://localhost into browser, it asks me password and username. I cant just pass that. Therefore, i cant use anything. Where this password and username thing come from? I didn't put password anywhere!
What can i do?
Thatnks

Dani AI

Generated

Two things normally cause an unexpected username/password prompt in a local WAMP/IIS setup: an authentication rule on the server that’s asking for credentials, or a different service answering HTTP requests than the one you expect. was right to point at server directives, and was right about a service conflict — ’s note that stopping IIS fixed the problem shows the conflict path was the real culprit here.

Quick, practical checks you can run on a Windows box to see what’s actually answering HTTP requests (replace the PID placeholder with the number you get):

netstat -ano | findstr ":80"
tasklist /FI "PID eq <pid>"

If the PID belongs to an IIS process, IIS is handling the request; if it belongs to Apache, keep reading.

If Apache is prompting for credentials, search your document root and parent folders for Basic Auth directives or .htpasswd files (this finds common Auth directives):

findstr /S /I /M "AuthType AuthName AuthUserFile Require" C:\wamp\www\*
dir /S /B C:\wamp\*.htpasswd

Temporarily renaming any .htaccess/.htpasswd found will quickly show whether the auth prompt stops.

If IIS is serving the request, check the site’s Authentication settings in IIS Manager — a missing Anonymous setting or enabled Windows/Basic auth will cause browser credential prompts. Also inspect server logs (Apache logs in WAMP’s log folder; IIS logs in inetpub\logs) to see which server recorded the request and why it challenged the client.

Extra quick checks: confirm localhost maps to 127.0.0.1 in your hosts file, and make sure the WAMP tray icon indicates Apache started. These steps will let you identify whether the prompt is config-based (auth rules) or a service conflict, and then remove or adjust the offending setting safely.

Recommended Answers

All 4 Replies

The password protection is most likely coming from an apache directive. Refer to the documentation which most likely explains it.

i have ISS runing on this computer as well. Do you think there is something suspicious? because it uses port 80.

I have stopped ISS and started wamp mysql and wamp php. now it is cool.

Yea, if you started using IIS and then subsequently started WAMP, your wamp web server probably didnt start, only the mysql server started most likely. If you would like to run both, you can easly change the port for the apache server in the httpd.conf file. It should be around line 50, you will see "Listen 80". Change that to something like 8080 or 8888 and then restart. The only drawback will be that you will have to access your apache server on localhost:8080 or localhost:8888. The IIS server will be just localhost.

Hope that helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.