I just did a fresh install of build 817 from svn and this is still an issue. I believe the real issue is this, when attempting to access the API through the internal PHP method, PIWIK is loading a lot of extra code that it should not be. I am noticing PIWIK interfering with my session's and smarty install. It might be loading a lot of other things which should probably be removed for API but those are the only ones that really interefere.
I am using the following code in a test.php file inside the dir of the install:
// Default API setup define('PIWIK_INCLUDE_PATH', '.'); define('ENABLE_DISPATCH', false); require_once PIWIK_INCLUDE_PATH . "/index.php"; require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php"; Piwik_FrontController::getInstance()->init(); // Close the PIWIK Session so we can handle our own session // Why is PIWIK starting a session when all I want is access to the API? session_write_close(); session_name("test"); session_start(); # This should fail because I haven't included my smarty $smarty = new Smarty(); echo 'Done!';
Is there any additional testing I should do to help with this issue?
To fix this issue, what we should due is use autoload in Piwik http://nz2.php.net/autoload
That would increase global performances by only including required files at run time + would fix this bug.
actually your test.php seems to work now (ie: it fails).
I close as worksforme, please reopen if you still experience issue with latest release