Make WordPress Core

Changes between Initial Version and Version 8 of Ticket #2866

06/28/06 14:24:25 (9 years ago)

Matt, what you just said about "other countless plugins" using the same technique... dude, that theory doesn't hold water. The theory that countless other plugins are broken (and in my personal supercharged 3rdparty plugin mishmash, so far I haven't found any that uses this technique) does NOT matter ZILCH in the face of the fact that Widgets also needs fixing. I respect your opinion, but the "other boys do the same brokenness as well" argument just doesn't fly with me :-)

It should float very well, but I hate how you assume that because some plugin does what the WP core does with no issue on a regular blog, it is therefore "broken". I'm not sure where you found your definition of broken, but they've been working pretty darn good for us for the past few months.

Your solution is twice as hackish than anything in the core right now, and is fundamentally broken a few ways. First plugin that does chdir() breaks everything. chrdir() is disabled on many servers for security reasons.

  1. First plugin or auto-prepended script to do chdir breaks everything.
  2. getcwd()'s value changes to be unusable with its context, for example during shutdown, where its value becomes "/"
  3. I still fail to


  • Ticket #2866

    • Property Type changed from defect to enhancement
  • Ticket #2866 – Description

    initial v8  
    77Since, for all general executions of the blog engine, dirname(__FILE__) in wp_blog_header.php should equal the results of getcwd(), I'm changing this.  Attached is the patch that performs this fix on WordPress 2.0.3 (plus nonces fixes). 
     9{{{All plugins that use this method are broken. BRO-KEN. By design. In other words, it's a really dumb idea. 
     11Why? Because str_replace(dirnameFILE with siteurl) can't be assumed to yield the right URL. 
     13- odd WP installation paths or Apache mappings can make the replacement useless - }}} 
     15No, any string should be replaced by any string fine. Now, please, before you go on telling us where this is so wrong, a use case outside of your single hack of trying to make WordPress-MU out of a normal install. I'd like to be accomodating to your attempts, but suggesting that every plugin is broken in a place where we have never heard anyone complain that they are broken in a real environment despite hundreds of thousands of testers for the past few years is a bit of insanity.