[geeklog-devel] Interesting bug - path collision

Joe Mucchiello joe at ThrowingDice.com
Wed Sep 3 19:39:48 EDT 2008


Would allow who to differentiate? We're talking about a call to
include_once. We can't change the implementation. How do you add a
regex to the following code to force include_once to only load the
capitalized Mail.php in the PEAR directory?

At 02:37 AM 9/3/2008, Michael Jervis wrote:


> include_once( 'Mail.php' );

> include_once( 'Mail/RFC822.php' );




At 05:32 PM 9/3/2008, Damien Hodgkin wrote:

>The regex would allow you to differentiate from the capitalized Mail.php and

>the lower case mail.php.

>

>On Wednesday 03 September 2008 05:04:56 pm Joe Mucchiello wrote:

> > At 04:15 PM 9/3/2008, Damien Hodgkin wrote:

> > >How about adding a small check to see if your running on a windows

> > >system, and

> > >then make sure the correct file is included by doing a regex on the file

> > > name to make sure it is Mail.php and not mail.php.

> > >

> > >You can use case to your advantage on a windows system, it's just a matter

> > > of how you do it, what tools you utilize and think outside of the four

> > > paned window ;)

> >

> > How would that work? The problem is we want to open the PEAR Mail.php

> > but there is a mail.php in the current working directory. What will a

> > regex do to stop the OS from finding the file mail.php when we ask to

> > open the file Mail.php? It's not like you can rewrite how include_once

> > works.


----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com




More information about the geeklog-devel mailing list