Hi,
It would be risky to have it in the document root, but we'll think about it.
So far, your only option is to try to modify the Piwik script. It uses the Zend framework and the file to patch is the /libs/zend/Session.php:
Line 451, there is:
throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
You would need to comment it out by adding '//' at the beginning of the line (or to remove the whole line):
// throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
Line 469, there is:
$startedCleanly = session_start();
You could replace it with:
if ( session_id() ) {
$startedCleanly = session_id();
} else {
$startedCleanly = session_start();
}
Note that I did not test Piwik with that patch, but I think that should work.
Of course, if you upgraded Piwik, you would likely lose those modifications.