@mattab opened this Issue on December 9th 2008 Member

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";

   // 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?
    # This should fail because I haven't included my smarty
  $smarty = new Smarty(); 
  echo 'Done!';
@anonymous-piwik-user commented on January 8th 2009

Is there any additional testing I should do to help with this issue?

@mattab commented on January 14th 2009 Member

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.

@mattab commented on January 14th 2009 Member

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

This Issue was closed on January 14th 2009
Powered by GitHub Issue Mirror