for WP 2.3, you need to use the following
$result = str_replace("index.php/Index.php","index.php",$result);
Got mine working by modifying my php.ini file and increasing the following options:
max_execution_time = 90 ; Maximum execution time of each script, in seconds
max_input_time = 120 ; Maximum amount of time each script may spend parsing request data
memory_limit = 16M ; Maximum amount of memory a script may consume (8MB)
Those numbers are what worked for me. This is what I had when it was failing:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)