Config-files include from private directory

(Jeffrey) #1

Hello together

I’ve just installed piwik successfully on my Webspace.

Is it possible to include the config-files (config.ini.php & global.ini.php) from a directory outside the public directory?

So, that the directory of the config-files would be:
Old: /home/www/webxxx/html/piwik/config
New: /home/www/webxxx/files/piwik/config


(vipsoft) #2

Yes. Use bootstrap.php.


(Jeffrey) #3

Hello vipsoft

thx for your fast answer!

Sry, I’ve expressed myself wrong. I would like to more secure piwik by moving the config-files of piwik to a private directory outside the public html directory.

Is that possible?


(vipsoft) #4

I’m posting from my phone so my response was perhaps too terse.

The answer is YES. Use bootstrap.php to define PIWIK_USER_PATH to point to where you moved both the config and tmp folders. This is explained in:

(Jeffrey) #5

So, I did:

  1. make the file bootstrap.php in the piwik root directory
  2. copy the /config and the /tmp folder to /home/www/webxxx/files/piwik (with file same file rights)
  3. fill the bootstrap.php with:
<?php define('PIWIK_USER_PATH', "/home/www/webxxx/files/piwik"); ?>

But now, I get the error message “unable to read resource: “CoreHome/templates/header.tpl”” when I like to open Piwik.

What did i false ?


(vipsoft) #6

Do you have open basedir restrictions?

(Jeffrey) #7

Yes, there are some, but I don’t know which in specific.
The php safe mode is off

Update: I sent you the PHPinfo as a PM. I hope this help to find the solution.

(vipsoft) #8

Ah. Ok. This is now fixed in SVN:

(Jeffrey) #9

Hello vipsoft

thx for your fast help.
The change of view.php was the solution. Now it works correctly!

I wish you a happy new year :=)