Relocate whole tmp folder


#1

Hi all,

I just installed Piwik locally and then moved it to my server.

Why did I do this? Because I can only upload files to my server but NOT change any file permission etc.

Therefore it is crucial for me to point the “tmp” folder to another folder on the file system (which then is writeable by default).

How can I do this?
I already changed template_c, assets and logs in my config.ini.php - but this change doesn’t even show up on the error screen where it states:

chmod 0777 /vhosts/dw11897/content/initial/htdocs/piwik/tmp
chmod 0777 /vhosts/dw11897/content/initial/htdocs/piwik/tmp/templates_c
chmod 0777 /vhosts/dw11897/content/initial/htdocs/piwik/tmp/cache
chmod 0777 /vhosts/dw11897/content/initial/htdocs/piwik/tmp/assets

suggestions?


(vipsoft) #2

Instead of changing all those files, create a file called “bootstrap.php” in your piwik folder. In it:


<?php
define('PIWIK_USER_PATH', '/absolute/path/to/my/writeable/directory');

That directory will be used for the “config” and “tmp” folders.


#3

Nice!

Thanks for advice.
BTW: Haven’t found this in any documentation or within the forum!


(vipsoft) #4

http://piwik.org/docs/include-piwik-in-your-project/