smarty should not load when using internal API #473
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
worksforme
The issue cannot be reproduced and things work as intended.
Milestone
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
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();define(‘PIWIK_INCLUDE_PATH’, ‘.’);
define(‘ENABLE_DISPATCH’, false);
require_once PIWIK_INCLUDE_PATH . “/index.php”;
require_once PIWIK_INCLUDE_PATH . “/core/API/Request.php”;
$smarty = new Smarty();
echo ‘Done!’;
```
The text was updated successfully, but these errors were encountered: