@anonymous-matomo-user opened this Issue on January 10th 2011

I have a Kohana backend application which uses Piwik API to show tracking statistics.
Calling the API with PHP creates a directory /tmp/templates_c in my application public folder.
This directory should not be created in my application folder but in Piwik installation folder.

@robocoder commented on January 10th 2011 Contributor

Not sure why it would create tmp/templates_c in your app's public folder ... I'm guessing PIWIK_INCLUDE_PATH (or PIWIK_USER_PATH) aren't set correctly by your app. But it sounds like you're calling Piwik classes directly.

Take a look at the example in misc/api_internal_call.php. If you set:

define('PIWIK_ENABLE_DISPATCH', false);

the FrontController doesn't get instantiated (and so, shouldn't create tmp/templates_c).

@anonymous-matomo-user commented on January 11th 2011

Replying to vipsoft:

Not sure why it would create tmp/templates_c in your app's public folder ... I'm guessing PIWIK_INCLUDE_PATH (or PIWIK_USER_PATH) aren't set correctly by your app. But it sounds like you're calling Piwik classes directly.

Take a look at the example in misc/api_internal_call.php. If you set:

define('PIWIK_ENABLE_DISPATCH', false);

the FrontController doesn't get instantiated (and so, shouldn't create tmp/templates_c).

First, i have coded exactly what it is described on the wiki page :
[http://dev.piwik.org/trac/wiki/API/CallingTechniques]
The only difference between the example and my work is that my application doesn't directly include Piwik.
One more thing : in the Piwik code, folders like tmp/templates_c are relatives, not absolutes. They should be prefixed with PIWIK_INCLUDE_PATH.

This Issue was closed on January 11th 2011
Powered by GitHub Issue Mirror