﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
2866,WP can't be used from a single source installation,RuddO,anonymous,"In summary, WordPress can't be used in a single source installation.

To achieve this, I'm using a technique which involves having WP in a master directory, plus a ""phantom"" directory for each different blog - where wp-config.php resides, and the other WP files are symlinks to the master directory's contents.  I thus, for each blog, set the Apache DocumentRoot to the blog's phantom directory (which contains that blog's wp-config.php) rather than to the master directory.

This would work okay, except for the fact that, on wp-blog-header.php, `if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {` does not work, because __FILE__ points to the *real* wp-blog-header.php instead of to the wp-blog-header.php on the phantom directory.  Of course, this results in wp-config.php ""not existing"".

Since, 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).

{{{All plugins that use this method are broken. BRO-KEN. By design. In other words, it's a really dumb idea.

Why? Because str_replace(dirnameFILE with siteurl) can't be assumed to yield the right URL.

- odd WP installation paths or Apache mappings can make the replacement useless - }}}

No, 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.",enhancement,closed,normal,,General,,normal,duplicate,,
