@mrmonday opened this Issue on November 16th 2017

When viewing:


I get the warning message:

WARNING: /var/www/siteurl/vendor/twig/twig/lib/Twig/Loader/Filesystem.php(35): Warning - realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/siteurl) - Piwik 3.2.0

Looking at where Twig_Loader_Filesystem is used, the $rootPath parameter is not passed to the constructor, so it falls back to the current working directory (which happens to be outside of the basedir for the PHP installation).

PHP Version: 7.0.19-1
Piwik Version: 3.2.0

I can provide more information if needed.

@sgiehl commented on November 17th 2017 Member

could you check if this changes fixes your problem:

@mattab commented on December 3rd 2017 Owner

Hi @mrmonday have you had a chance to test the patch from https://github.com/piwik/piwik/compare/twigroot and does it help remove the warning?

@mrmonday commented on December 6th 2017

Unfortunately this issue happens sporadically (it only happened for certain sites/date ranges), and I cannot currently reproduce it.

If it happens again, I will try the patch.

@mrmonday commented on January 15th 2018

This issue repeated after upgrading to 3.3.0. Applying the patch appears to have resolved the issue.

Powered by GitHub Issue Mirror