Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of directory /tmp/templates_c while using api #1994

Closed
anonymous-matomo-user opened this issue Jan 10, 2011 · 2 comments
Closed

Creation of directory /tmp/templates_c while using api #1994

anonymous-matomo-user opened this issue Jan 10, 2011 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
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
Copy link
Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants