PDA

View Full Version : Windows 200 Installation - index.php asks for a username and password.


\(^_^)/
Wed 10th Oct '01, 4:40pm
I'm running Win2000 (which is really just NT), IIS 5.0.

When I try to run index.php, I am asked for a Windows username and password.

When I enter a valid windows password, the board works fine.

ATTEMPTS TO ISOLATE THE PROBLEM (Windows or VB?)
I created a file "test.php" in this same directory. (It has some PHP statments -- not just a file with plain vanilla HTML.) It runs fine without asking for a windows login.

Renamed test.php to index.php (yes, I backed up the real index.php file). Runs fine (does not ask for login). Restored the correct and original index.php.

When I go to the VB control panel in a subdirectory of the above, it does not ask for a windows login. Just the regular VB login, which works.

PRELIMINARY CONCLUSION: this points away from a Windows authentication issue because my test file runs properly as does the control panel login.

CONTINUED PURSUIT OF ISOLATING THE PROBLEM
In IIS Admin console (Internet Services Manager), for the entire website, the forum directory, and index.php. I looked at the Properties, Directory Security.

Anonymous access is granted for all. Permissions on these appear correct. Plus, permissions are the same on the file that works and the one that does not.

For all of these, "Integrated Windows Authentication" is checked. I unchecked this box and tried to run index.php. Result: access denied. I am not prompted to login, flat out denied access.
I restore "Integrated Windows Authentication" and I'm back to needing to provide a windows login.

I am puzzled as to what to check or try next. Any help is greatly appreciated.

Delhaze
Wed 10th Oct '01, 6:04pm
Check the ntfs permissions for the index.php file, its probably had the everyone permission removed, or something similar that prevents the iusr_computername account access.

If it's not that something strange is going on.

As a work around rename index.php temp.php, create a new index.php, copy the contents of temp.php to the new index.php.

\(^_^)/
Wed 10th Oct '01, 6:37pm
Originally posted by Delhaze
Check the ntfs permissions for the index.php file, its probably had the everyone permission removed, or something similar that prevents the iusr_computername account access.

ntfs permissions are OK.

If it's not that something strange is going on.

As a work around rename index.php temp.php, create a new index.php, copy the contents of temp.php to the new index.php.

Excellent suggestion. It gives me a different behavior. I am not prompted for a password. Now I get a "blank" web page. When I view source, all I get is the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>


This is my first experience installing VB. However, I've done a lot of server-side web development and it appears that the processing crapped out because of some error condition.

I'm continuing to work on this. Input and suggestions are always most appreciated. Hmmm.....

Delhaze
Wed 10th Oct '01, 6:46pm
Oooh errr !! This is a very unusual one. .:confused:

Can you post the url so we can look at it here, by PM if needed.

\(^_^)/
Wed 10th Oct '01, 6:52pm
--> edited to remove the URL

Thanks for taking a look!

I'll add that I haven't changed index.php whatsoever from the default installation.

Delhaze
Wed 10th Oct '01, 7:03pm
Same result here, ie. empty index.php.

However I also tried forumdisplay.php as a test, and got an authentication popup.

Do you have anonymous access enabled as well as integrated windows authentication ?

\(^_^)/
Wed 10th Oct '01, 7:07pm
I have both anonymous access and integrated windows authentication enabled.

That was the default setting.

When I unchecked the windows authentication, I went straight to an access denied page. No opportunity to log in. No blank page like now.

I put windows authentication back in and get the login prompt on some pages.

Delhaze
Wed 10th Oct '01, 7:47pm
I'm not usre what's going on, difficult without being there.

A authentication prompt should only be thrown up when IIS thinks the current user account (the ISUR_computername) does not have access to a file.

Therfore I would still suspect that the permissions are not right, maybe some inheritance is at fault.

Have you tried restarting iis, and maybe even a reboot?

\(^_^)/
Wed 10th Oct '01, 8:02pm
In fact, I just tried stopping and restarting IIS. No change.

Next step is reboot the server.

I am shifting back to thinking there is something strange in the permissions and their inheritance like you suggest. Possibly in how the server is configured. Fortunately, the webserver is onsite and the guy who set it up is accessible.

Windows is notorius for allowing you to change properties. Er, rather, appearing to allow you to change properties. But, in actuality, something is written to the registry that does not get updated. Usually hidden, undocumented things. Argh.

Thanks for your help. If/when this gets fixed, I'll post the resolution.

Martin
Wed 10th Oct '01, 8:35pm
check the folder permissions to make sure they are web accessible and that all subfolders inherit the same permissions.

this is a server, not installation, issue, so I'm moving it there :)

\(^_^)/
Tue 16th Oct '01, 8:13pm
Yay! It's finally fixed.

In hopes of sparing someone else from this agony, here is what the problem was.

It was the file attribute of each file. Nothing to do with the server or folder/file permissions.

Select a file, right-click, select Properties. Under Attributes, click the Advanced... button. The "Encrypt contents to secure data" was checked for every friggin' file.

Why??? How??? I do not know. I did use PKZip to extract the files. I normally use WinZip, but PKZip was at my disposal. I did not change anything from the default settings. I can't bear to look at PKZip right now.