[wp-trac] Re: [WordPress Trac] #2866: WP can't be used from a single source installation

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 29 03:57:53 GMT 2006


#2866: WP can't be used from a single source installation
-------------------------+--------------------------------------------------
 Reporter:  RuddO        |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:           
Component:  General      |      Version:           
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by RuddO):

 We seem to diverge on this issue.

 Here are the technical reasons why I think your last post is flawed.  Note
 that I said "I think".

 In this context, "broken"'s definition is simply "assuming things that
 aren't necessarily true".  In this context again, the untrue assumption is
 that files can only have ONE path name, which is evidently FALSE on UNIX.

 You said: "First plugin or auto-prepended script to do chdir breaks
 everything."

 No, no plugin can break anything in WP core by issuing a chdir(), since
 the getcwd() calls are executed before plugin execution - you can easily
 see the getcwd() calls are invoked right at the beginning of core engine
 load.  It also doesn't break the patch I submitted for widgets, since the
 Widgets plugin just uses siteurl, not getcwd().


 You said: "getcwd()'s value changes to be unusable with its context, for
 example during shutdown, where its value becomes "/" "

 Now, this isn't affected by WP core + my patches.  As I said earlier,
 plugins should not use __FILE__ to determine public URLs to submit to the
 browser, and this has nothing to do, absolutely, to what you just said.  I
 also DO NOT advocate to use the getcwd() technique to determine public
 URLs, as you can see from my patch to the Widgets plugin.  In summary,
 both __FILE__ and getcwd() are broken.

 You said "I still fail to"

 Of course, I can't reply to this. Your brush seems to be running out of
 pai

 (the last sentence is a half-hearted joke ;-)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2866>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list