Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CProgrammer

IIS and php

This topic is 5336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I have my website in my localhost folder. Everything works fine, but if the user tries to access the php driven part of my site he''s asked for a password and user name, why? Oh the php files are in a folder called cgi-bin, could that be the problem? -CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
Whenever I add web sharing options to the folder this occurs.
-CProgrammer

[edited by - CProgrammer on March 6, 2004 12:01:34 AM]

Share this post


Link to post
Share on other sites
CProgrammer:
php files are normally not run from cgi-bin/ folders. php can run from anywhere under DocumentRoot provided you have a php engine compiled into the web server. I am not sure how or even if IIS will run php code.
With the type of error you are getting, check your IIS setup, search for default.htm(l) and index.htm(l) as this will probably tell you where the default files are. place your php files there and then try to access them. If you get the same errors then you might want to check the permissions on the files/folder as Arild Fines suggested.

Share this post


Link to post
Share on other sites
From the tests i''ve made I assume that putting all the php files into the root directory(e.g. wwwroot) would solve the problem. However I don''t really want this, because it would make the root directory messy, plus i''d have to change all the links.
Oh and I tried tons of variations of folder permissions of cgi-bin. It seems IIS always asks the user of my site for a password when he accesses content in a folder with set permissions. Folders without any access permissions work fine, but obviously cant execute php scripts.
Oh and if I just test the site under http://localhost all works great. If i use my ip address as a user would it works fine except for the content of cgi-bin(directory with folder permissions set).
Geeze what to do.
-CProgrammer

Share this post


Link to post
Share on other sites
in the wwwroot/ folder you could create a folder scripts/ and place your php files there.

In your cgi-bin/ folder try running a simple perl script from there name it something like test.pl and see what happens.

As far as the password problem, look and see if there is a hidden .htaccess file in your cgi-bin/ directory.
I wish I knew IIS a little better to help you out with problem.

What you might think about doing if possible is run apache. I here the windows version has some very naughty bugs though. If you are interested in running a version *nix that could be another option.

Is this for a personal site or commercial?

Share this post


Link to post
Share on other sites
Thanks for the reply.
I''ll search for the htaccess file and try out your other suggestions as soon as I get home.
Oh and this is gonna be a private site.
-CProgrammer

Share this post


Link to post
Share on other sites
IIS doesn''t use .htaccess files.

The problem should not be occuring, and may have to do with the permissions on the file system/folder and the network user.

Your PHP scripts also really don''t belong in cgi-bin, since they''re not executed via CGI.

Share this post


Link to post
Share on other sites
quote:
Original post by Arild Fines
Well, theoretically, he *could* be running PHP through CGI...
True. Inefficient, but quite possible.

Btw, have you ever used Python for ASP development (assuming you do ASP development)?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!