Member Avatar for djMot

I cannot get my locally installed Apache 2.2 to execute a .php if simply passed the folder.

For instance, if I tell my browser, "http://localhost/dev/wordpress/wp-admin/" it simply gives me a directory listing of the folder. There is an index.php file there, and if I click it, it executes normally. Or, if I tell the browser, "http://localhost/dev/wordpress/wp-admin/index.php" the file executes normally.

In the Apache configuration file (httpd.conf), I have the following settings in support of PHP:

...
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
...
<IfModule mime_module>
    AddType application/x-httpd-php .php .html 
   ...
</IfModule>
...
PHPIniDir "C:/Program Files/PHP"

Is there something else I'm missing that would preclude Apache/PHP from executing index.php when passed only a folder reference?

Thanks!
Tom

Recommended Answers

All 2 Replies

In the httpd.conf file you should have a line similar to DirectoryIndex index.html Change this to DirectoryIndex index.php

Member Avatar for djMot

Thanks xan.

I knew it was something remarkably simple like that. Sadly, "remarkably simple" escapes me sometimes. :icon_redface:

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.