Hi, I'm Dominik Schwind, friend of the internet. Here is /now.
Say hello to me on Twitter or maybe even subscribe to my weekly newsletter.

November 30, 2009

I had some problems bootstrapping WordPress MU so I can use it’s native functions for a command line script.
Basically those lines in wpmu-settings.php stopped the command line script from working:

if( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
	header( "Location: http://" . $current_site->domain . $current_site->path );

The fix seems to be to set the $_SERVER[ ‘HTTP_HOST’ ] to the root domain of the installation: