PHP Bug – glob(), GLOB_BRACE, and Windows paths

I stumbled upon a PHP framework called Kohana, which is based on CodeIgniter. I've used CI a bit in the past and thought I'd give Kohana a whirl. I downloaded the latest code and tried to run it on a Windows XP machine.

Well, when I brought up the site, I got an error:

Fatal error: Unable to locate the requested file, log.php in <system_path>/system/core/Kohana.php on line 408

After a lot of digging, I found that there was a glob() call that was not behaving correctly. I narrowed it down to what I believe to be a bug in PHP with the glob() function, using the GLOB_BRACE flag, and using a pattern that includes a colon (as in {c:/firstFolderToCheck,c:/secondFolderToCheck}).

Assuming it turns out to be valid, I'm surprised that it hasn't been found/reported before...

Topics: ,

2 Comments

  1. October 6, 2007 @ 12:20 pm #

    Thank you for sharing!

  2. May 5, 2008 @ 7:40 pm #

    wow great share thanks for the info...

Leave a Comment

Sorry, comments are closed. You can contact me directly, if you like.

Eric Martin
1home
2blog
3projects
4photography
5about
6contact
ssearch
ccomment
p/←previous
n/→next
ttop