Post by 440music » Tue Sep 06, 2022 2:07 am

Ubuntu 20.04LTS
OpenCart 4.0.1.1
Default Theme
No Extensions(yet)
PHP 8.0.23
Plesk Obsidian Version 18.0.46

I thought I'd do a fresh install of version 4.0.1.1 I have a good back of v3 and I know I can go back and try doing the Upgrade if I can't find the answer to my error. I don't understand GitHub and have difficulty finding answers there.
Install error:

Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/path/is/hiden/for-security/:/tmp/) in /path/is/corect/to/file/system/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 91Twig\Error\LoaderError: The "/" directory does not exist ("/"). in /path/is/corect/to/file//system/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 92

The code I found in FilesystemLoader.php related to error:
/**
* @throws LoaderError
*/
public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE): void
{
// invalidate the cache
$this->cache = $this->errorCache = [];

$checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
}

$this->paths[$namespace][] = rtrim($path, '/\\');
}

hope you can help 8)

Tommy TBones
Owner
440Music Entertainment Co
Chicago, IL
Indie Music Radio


User avatar
New member

Posts

Joined
Wed Jun 24, 2020 8:19 am
Location - Chicago, IL USA

Post by straightlight » Tue Sep 06, 2022 10:09 am

Contact your host to disable mod_security.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chaoos » Wed Sep 21, 2022 8:00 pm

straightlight wrote:
Tue Sep 06, 2022 10:09 am
Contact your host to disable mod_security.
If he has shared hosting, his host will not help him. More and more people have this problem.

Newbie

Posts

Joined
Wed Sep 21, 2022 7:58 pm

Post by chaoos » Wed Sep 21, 2022 10:23 pm

440music wrote:
Tue Sep 06, 2022 2:07 am
Ubuntu 20.04LTS
OpenCart 4.0.1.1
Default Theme
No Extensions(yet)
PHP 8.0.23
Plesk Obsidian Version 18.0.46


it helped me to remove the code from system/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php
if (!is_dir($checkPath)) {
throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
}

Newbie

Posts

Joined
Wed Sep 21, 2022 7:58 pm
Who is online

Users browsing this forum: No registered users and 4 guests