include and require not working with ./ in Windows

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm using PHP 5.0.5 as an ISAPI module on IIS 6, Windows Server 2003.

Files specified by include() or require() don't get included if the
filename begins with ./ (dot slash). phpMyAdmin uses this convention,
as I'm sure many other applications do. This works fine on several
other servers that I administer, although they are using PHP 4 as CGI.

Here's how I am reproducing the problem.

I have a file, includetest.php:

echo "include_path = " . get_include_path() . "<br />\n";
echo "Here is ./<br />\n";
echo "Here is<br />\n";

Here is, which is in the same directory:

This is the contents of<br />

Here are the results of running the script through PHP:

include_path = .;D:\PHP5\includes
Here is ./

Warning: main(./ [function.main]: failed to open
stream: No such file or directory in c:\inetpub\wwwroot\includetest.php
on line 4

Warning: main() [function.include]: Failed opening './'
for inclusion (include_path='.;D:\PHP5\includes') in
c:\inetpub\wwwroot\includetest.php on line 4
Here is
This is the contents of

As you can see, if I take the ./ away from the path it works fine.

Site Timeline