Jump to content

apache pages keep asking for username and password


Recommended Posts

Hi all, newbie here to Apache, MYSQL and PHP

 

I have downloaded and installed MySQL and Apache.....after installing apache I did a test run as the book indicates to my local host by typing in 127.0.0.1 to see the default page in the apache directory. However, I keep getting prompted for a username and password. How can this be eliminated?

 

Am using Windows XP with SP 2 on a develompental machine

Link to comment
Share on other sites

Did you install a package that installs Apache, MySQL and PHP together? It might have come with a restrictive set of config files that password protect all directories by default. Look through httpd.conf --> find root directory configuration --> make sure there is nothing there about passwords. Also make sure there is not .htaccess file in the root directory, if there is, delete it.

Link to comment
Share on other sites

UPDATE:

 

Did not find any password info. Only .htaccess files were in the manual directory (deleted them) still no go. However, when I try to restart the Server it does give me a messae that "php5apache2.dll could not be loaded or found.

 

That particular file is on my hard drive at C:\PHP

 

 

This is driving me crazy......is anything from above helpful?

Link to comment
Share on other sites

UPDATE:

 

Did not find any password info. Only .htaccess files were in the manual directory (deleted them) still no go.

 

Don't delete them from there, .htaccess files only control the folder they are in, global settings go into httpd.conf.

 

However, when I try to restart the Server it does give me a messae that "php5apache2.dll could not be loaded or found.

That particular file is on my hard drive at C:\PHP

 

This file needs to go to the folder where apache is looking for the extensions. I forgot what it is for Windows, but just look where the other extensions are. Alternatively, you can define full path under extensions section in httpd.conf

 

This is driving me crazy......is anything from above helpful?

 

Not really. Another thing you could do though is look through log files. On windows machines apache can either log to a text file or syslog. Check them both out. There might be a message about passwords. Alternatively, since you just installed, get a fresh httpd.conf files from somewhere and replace yours with it just to make sure you didn't get any weird settings in yours. If you want to attach yours, I can check it out.

Link to comment
Share on other sites

The line 115 that loads php needs to look like this if file is really in C:\php\ (You have extra slash and a space)

LoadModule php5_module c:/php/php5apache2.dll

 

Try setting line 150 to something else, just to make sure its not permissions problems. Make a folder called www on C:\ drive, then set like 150 to

DocumentRoot "C:/www"

In that folder, make a file called index.html that displays something like "hello world" so apache gets an index file.

Also set line 178 to the same path

<Directory "C:/www">

 

Change line 163 to (you override it later, but just in case)

Order allow,deny

 

Permissions could be a problem in vista, I never had any problems in XP, but you can test a new folder just in case.

163 is probably what's causing the problems

PHP should load fine once you change line 115.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.