[geeklog-devel] Interesting bug - path collision

Damien Hodgkin dracul01 at gmail.com
Wed Sep 3 19:48:20 EDT 2008


Nevermind Joe, obviously you can't think outside the Windows Box. 
But just to let you know there are ways, like say IF..ELSE statements, Adding 
a custom function so your call to include_once would resemble:
  include_once(custom_function(param1, param2));

A little brainwork goes a long way, PHP can do a lot of things you just have 
to have the imagination to come up with them. That is why we are "hackers" we 
solve problems. 

If I hosted on a Windows box I would gladly hack up a solution, but I don't 
(can't stand Windows).

--
Damien

On Wednesday 03 September 2008 07:39:48 pm Joe Mucchiello wrote:
> 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
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel





More information about the geeklog-devel mailing list