[wp-trac] [WordPress Trac] #14913: MS Requires Client Information to Load Files

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 20 20:55:37 UTC 2010


#14913: MS Requires Client Information to Load Files
--------------------------+-------------------------------------------------
 Reporter:  filosofo      |       Owner:  filosofo      
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Future Release
Component:  Multisite     |     Version:  3.1           
 Severity:  normal        |    Keywords:  needs-patch   
--------------------------+-------------------------------------------------
 When installed as multi-site, WP in `ms-settings.php` tries to parse the
 Host header request to determine which domain is requested.  If none, it
 prints a redirecting Location header and exits.

 This is problematic if you are loading WP but not using a client that
 sends headers to the server; for example, if you have another app on the
 same server that tries to include `wp-load.php` directly.

 Example:

 {{{
 <?php

 include '/path/to/wp/wp-load.php';

 // let's do some stuff with WP programatically...
 }}}

 The above aborts in MS as it tries to redirect the nonexistent requesting
 client to the main blog's front page.

 The problems I see with this:
  * `wp-load.php` is supposed to provide a means of circumventing the
 template printing, so it shouldn't assume a typical browser client is
 making the request
  * `wp-load.php` ''can'' be used this way on non-MS setups
  * In general, it's a bad jumble of MVC.

 Currently I'm not sure what the best route is to fix this, but I will try
 to come back later with a solution.

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


More information about the wp-trac mailing list