Index: /trunk/include/onupdate.php
===================================================================
--- /trunk/include/onupdate.php	(revision 178)
+++ /trunk/include/onupdate.php	(revision 179)
@@ -48,11 +48,8 @@
 
 	/* activate the xpressme plugin */
-/* When updating it, it doesn't execute it because other plug-ins are invalidly set. 
-	$plugin_current = "xpressme/xpressme.php";
-	update_option('active_plugins', array($plugin_current));
-	include_once(dirname(__FILE__) . '/../wp-content/plugins/'.$plugin_current);
-	do_action('activate_'.$plugin_current);
-	$msgs[] = 'The xpressme plug-in was activated.';
-*/	
+	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
+	if (xpress_pulugin_activation('xpressme/xpressme.php')){
+		$msgs[] = 'The xpressme plug-in was activated.';
+	}
 	
 //	update_option("blog_charset", wp_blog_charset());
Index: /trunk/include/xpress_active_plugin.php
===================================================================
--- /trunk/include/xpress_active_plugin.php	(revision 179)
+++ /trunk/include/xpress_active_plugin.php	(revision 179)
@@ -0,0 +1,25 @@
+<?php
+if ( !function_exists('xpress_pulugin_activation') ){
+	function xpress_pulugin_activation($activation_plugin = '')
+	{
+		global $wpdb;
+		if (empty($activation_plugin)) return false;
+			
+		$plugins = get_option('active_plugins');
+		$is_active = false;
+		foreach($plugins as $plugin){
+			if ($plugin == $activation_plugin) {
+				$is_active = true;
+				break;
+			}
+		}
+		if (!$is_active){
+			array_push($plugins, $activation_plugin);
+			update_option('active_plugins', $plugins);
+			include_once(dirname(dirname(__FILE__) ) . '/wp-content/plugins/'.$activation_plugin);
+			do_action('activate_'.$activation_plugin);
+			return true;
+		}
+		return false;
+	}
+}
Index: /trunk/wp-config.php
===================================================================
--- /trunk/wp-config.php	(revision 178)
+++ /trunk/wp-config.php	(revision 179)
@@ -85,4 +85,17 @@
 	require_once(ABSPATH.'wp-settings.php');
 	wp();
+	
+	if (!function_exists('is_wordpress_style')){	// When the XPressME plug-in is invalid
+		require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ;
+		xpress_pulugin_activation('xpressme/xpressme.php');
+		// reloaded 
+		header('Location: ' . $xoops_config->module_url . '/');
+		
+		$err_str = "The activation of the XPressME plugin was executed.<br />\n";
+		$err_str .= "Because the XPressME plugin was invalid.<br />\n";
+		$err_str .= "Please do the rereading seeing on the page.\n";			
+		die($err_str);
+	}
+
 	if (is_wordpress_style()) {
 		require_once( ABSPATH . WPINC . '/template-loader.php' );
