We have uploaded a dev site to Kinsta and seeing this error on multiple installs.
is_file(): open_basedir restriction in effect. File(/www/mydomain/vendor/composer/installed.json) is not within the allowed path(s): (/www/mydomain/public:/www/mydomain/mysqleditor:/www/mydomain/web:/www/mydomain/deploy:/www/mydomain/deployment:/www/mydomain/deployments:/usr/share:/tmp)
It seems that vendor is being looked at in the site root ie. the /public/ folder, rather than in the theme root.
Anyone experienced this before on Kinsta and if there is a way to set the /vendor/ location somewhere to point to the theme directory?
We’re tried adding a path in PHP.ini but had no effect,
Any help will be appreciated.
1 Like
So if anyone needs the solution to this, you need to upgrade Acorn.
Or you can make the change in:
/vendor/roots/acorn/src/Roots/Acorn/Application.php
~line 269 (which the later versions of Acorn already include):
->filter(function ($path) use ($files) {
// return $files->isFile("{$path}/vendor/composer/installed.json")
// && $files->isFile("{$path}/composer.json");
return @$files->isFile("{$path}/vendor/composer/installed.json")
&& @$files->isFile("{$path}/composer.json");
})
Hope this helps,
Phil
1 Like
Let me just add a few keywords here for people having the same problem as I did.
Ultimately this thread pointed me in the right direction. THANKS!
This issue is relevant for me since I’m working on Kinsta and have a restricted open_basedir variable. And roots acorn seems to look for the installed.json config file in the wrong (restriced!) directory.
Which is causing the following error message in my logs:
FastCGI sent in stderr: "PHP message: PHP Warning: is_file(): open_basedir restriction in effect. File(/www/mywebsite_dir/vendor/composer/installed.json ) is not within the allowed path(s): (...
For detailed instructions on how to update acorn:
Guide for Updating roots/acorn v2 to v3