OpenCart extension installation not working

jaysacco

New Member
Messages
4
Reaction score
0
Points
1
I just installed OpenCart extension 4.0.1.1 with php 8.1. The installation said it was successful. However when I go to the OpenCart admin page I get the following on the webpage:

Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/headstoc/:/tmp:/var/tmp:/opt/alt/php72/usr/share/pear/:/dev/urandom:/usr/local/lib/php/:/usr/local/php72/lib/php/) in

/home/headstoc/ocartdata/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 91Twig\Error\LoaderError: The "/" directory does not exist ("/"). in /home/headstoc/ocartdata/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 92

I have php 8.1 installed and the open_basedir entry is empty (no value). Can someone explain where the open_basedir listed in the error message is coming from? In particular, note that the directories it lists are for php7.2, not 8.1 - that doesn't make any sense to me since I've installed php 8.1
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
normally x10 hosting does not provide script support.
but have you tried changing your php to 7.2 instead of using 8.1 ?
its possible your version of the OpenCart extension 4.0.1.1 was intended for php 7.2 not 8.1
 

jaysacco

New Member
Messages
4
Reaction score
0
Points
1
normally x10 hosting does not provide script support.
but have you tried changing your php to 7.2 instead of using 8.1 ?
its possible your version of the OpenCart extension 4.0.1.1 was intended for php 7.2 not 8.1
Thanks for your response. OpenCart 4 requires PHP 8.0+. I tried 7.2 anyway and the extension failed with a message that said "Requires PHP 8.0+". Can you explain why X10 is using a different php than the one I configured? That doesn't make sense to me.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
if the problem you have is with a plugin, its possible the plugin is not updated for that version of OpenCart.
as for the php version, when you configure the one to use you must set it as current for it to work.
you will see either (current) or (apply) next to the version of php you select
 

jaysacco

New Member
Messages
4
Reaction score
0
Points
1
Thanks for your continued help with this. The problem is with the OpenCart extension 4.0.1.1 itself, not a plugin for OpenCart. I'm aware of the php version "set current". 8.1 is current and has been. I'm still looking for a way to fix X10 and the OpenCart extension to use the currently selected and active 8.1 php, not the 7.2 version that is apparently getting used.
 

jaysacco

New Member
Messages
4
Reaction score
0
Points
1
Well, I didn't fix it, but I was able to workaround this by commenting out the offending code. My site and admin pages now come up successfully.
I commented out the following lines (90-92 in my file) in /ocartdata/storage/vendor/twig/twig/src/Loader/FilesystemLoader.php:

$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));
}
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
this still sounds like its a problem with the opencart script and not an actual x10 hosting issue.
you may get a better reply from the opencart support forums.
as mentioned earlier, x10 hosting does not provide script support.
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
Can you verify it is working now? There appears to have been a problem with the software that allows you to switch php version
 
Top