Hi Onepiece86,
I’ve viewed your topic and let’s start fresh as I’m do not want to clutter other attempts. We’ll start from the default status where you just have OpenCart freshly installed.
There are 2 issues you’re experiencing:
- OpenCart attempts to access folder stored externally to your hosting folder (not allowed)
- Wrong configuration in .htaccess
Simply put, open_basedir limits the scope that your application, i.e. OpenCart can access, it’s a security feature and it cannot be changed. Unfortunately the web root also cannot be changed as it’s fixed to /htdocs
.
To solve this, you need to change the structure of your application a bit. OpenCart structures as 2 major folder: public
and storage
.
Move folders and files so that everything in the public folder immediately inside htdocs, then place the storage also in htdocs.
You should have a folder list under htdocs
that looks something like admin
+ catalog
+ image
+ system
and some other php files.
Then place the storage folder here in the htdocs
folder.
Once that’s done, add a .htaccess file inside the storage folder with the following contents. This blocks public access to the storage folder.
Deny from all
Then in both /htdocs/config.php
and /htdocs/admin/config.php
, change the storage path to be the appropriate paths.
Specifically, you would want to change lines that looks like this and change it to:
define('DIR_STORAGE','/home/vol15_3/infinityfree.com/if0_36452575/midamoc.free.nf/htdocs/storage/');
If you notice paths that also contains /home/vol15_3/infinityfree.com/if0_36452575/ocartdata
Take note of those as they have to move to the following as well.
/home/vol15_3/infinityfree.com/if0_36452575/htdocs
This way your application can store data securely inside storage while not getting blocked by the security system.
I’ve also read the same guide as you did, but unfortunately that is not the proper solution and does not actually fix folder access issues, retrying would not yield anything.
Cheers,
Jason