Using regular WordPress, I can create console PHP scripts just including wp-config.php and accessing WordPress' functions. Those scripts are mainly cronjobs that perform maintenance.
However, in MU I can't do this. The scripts ends execution.
The last script I wanted to run was a converter from a stand-alone installation of bbPress to a new BuddyPress installation.
<?php
define( 'WP_USE_THEMES', false );
$blog_id = 1;
require( dirname( __FILE__ ) . '/html/wp-config.php' );
do_action( 'bbpress_init' );
remove_all_actions( 'bbpress_init' );
/*
code that fetchs the forum data and correctly inserts
them in the new installation
*/
?>
If I run the script accessing via HTTP everything works OK. If I run it on the console by typing:
php bbpress_importer.php
Execution ends inmediately.
This does not happen with regular WordPress. Any clue? Does anybody have had a similar problem?
Thanks.