Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Directory Listing Denied.  PHP

Posted on 2004-11-04
4
Medium Priority
?
921 Views
Last Modified: 2008-03-06
i installed

Windows 2000 Pro  SP3
PHP 4 ,Apache 2.0.52 win32  &  IIS

While i tried to run the Php application TEST. i found the following problem. In browser i typed the name like  "http://localhost/test/"  but in the browser its display the error like.

"Directory Listing Denied.
 This Virtual Directory does not allow contents to be listed."
0
Comment
Question by:Viji4u
  • 2
  • 2
4 Comments
 

Author Comment

by:Viji4u
ID: 12492804
if i try to call the function like   "http://localhost/test/index.php" in IE6, its display the source of index.php

is there any setting in IIS? how to set that? i am new to these basic setups.

how to solve this problem?  
0
 
LVL 5

Accepted Solution

by:
eyeh8u earned 300 total points
ID: 12493012
Right click on My Computer, Select Manage, scroll down to "Services And Applications" expand this out to the "Internet Information Services" tree, and expand down to your virtual directory. Right click and select "Properties". On the "Home Directory" tab you can select "Allow Directory Browsing" if you want to browse directories. That will get rid of the Vidtual Directory does not allow contents to be listed. If you want it to render index.php as the default page for a directory, Select the "Documents" tab and click add, enter index.php and press ok, press ok a few times to close your dialogs.

You will now be able to see index.php displayed if you go to http://localhost/test

Now the next problem is that you are getting the Source of the index.php file. This is because you have not installed PHP into your IIS Server. This (http://www.php.net/manual/en/install.windows.iis.php) section of the PHP manual details how to install PHP into IIS.

Now you list that you also have Apache on your system. It seems possible to me that you have a configured Apache instance running, with PHP in it, and you have put your php files into your IIS instance instead. Apache is a web server. So is IIS. You only need one of them. On windows I'd suggest using IIS as it's native to windows and pretty well integrated. Running Apache is possible, and not too much of a problem, but if you are new to this, then using IIS may be less painful.

You can of course download the CGI version of PHP from here: http://www.php.net/get/php-4.3.9-installer.exe/from/a/mirror

Which will give you PHP 4.3.9 installed directly (and working) into your IIS instance, this is what I use at home for development. Then it's just a case of adding index.php as a default document as I explained at first.
0
 

Author Comment

by:Viji4u
ID: 12493512
hi
Thanks lot for details.

now. Its working fine
0
 
LVL 5

Expert Comment

by:eyeh8u
ID: 12493595
Happy to help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question