Opencart rstriction errors HELP PLEASE!

  • Website URL

I removed it, i am trying something else

  • Error Message

Warning: require_once(): open_basedir restriction in effect. File(/home/vol13_3/infinityfree.com/****/htdocs/ocartdata/storage/vendor/aws/aws-sdk-php/src/functions.php) is not within the allowed path(s): (/php_sessions:/tmp:..:/var/www/errors:/home/vol13_3/infinityfree.com/****/***.rf.gd/htdocs) in /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/system/vendor.php on line 11

Warning: require_once(/home/vol13_3/infinityfree.com/****/htdocs/ocartdata/storage/vendor/aws/aws-sdk-php/src/functions.php): Failed to open stream: Operation not permitted in /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/system/vendor.php on line 11

Fatal error: Uncaught Error: Failed opening required '/home/vol13_3/infinityfree.com/***/htdocs/ocartdata/storage/vendor/aws/aws-sdk-php/src/functions.php' (include_path='.:/usr/share/pear/') in /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/system/vendor.php:11 Stack trace: #0 /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/system/framework.php(8): require_once() #1 /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/admin/index.php(20): require_once('/home/vol13_3/i...') #2 {main} thrown in /home/vol13_3/infinityfree.com/***/***.rf.gd/htdocs/system/vendor.php on line 11
  • Other Information

I tried the fix given by the admin to fix restrictions around OpenCART by changing the data directory to “htdocs/opecart”, but it’s the same thing, I keep getting errors

Admin has put together a very nice guide for installing opencart and the final tweaks required to make it compatible with infinityfree hosting

2 Likes

If you read carefully what I wrote, I literally mentioned following the post by admin to fix the issue but it still persists, this is why I am posting in the forum!

I do apologize

I actually did read your post but then got a phone call, got totally distracted and forgot what I had read and then posted :flushed:

Tomorrow I will install it and have a poke at the code, I doubt I will look at it tonight because I had quite a tough day at work

Possibly I may look at it tonight after I rest for an hour :+1: as I am curious as to whats going on on line 11 :face_with_monocle:

5 Likes

It’s some php dir restrictions problems, read many others like this online, I think admin explained it well in his post.
This is line 11

require_once(DIR_STORAGE . 'vendor/aws/aws-sdk-php/src/functions.php');

and even though it’s inside htdocs folder it still gives the error
i tried changing :
define('DIR_STORAGE', '/home/vol13_3/infinityfree.com/if0_38081877/htdocs/ocartdata/system/storage/');
to :
define('DIR_STORAGE', '/home/vol13_3/infinityfree.com/if0_38081877/htdocs/system/storage/'); but it’s still the same
Thanks for the effort mate

If you have the subdomain on a different directory, you’ll have to move the OpenCart data directory to your subdomain’s htdocs folder instead (so to yoursubdomain/htdocs instead of htdocs), then change the storage directory on your configuration file so that it points to the storage directory inside the system directory inside OpenCart data directory inside the new folder. This explains why you were having the open_basedir error, because the script can’t even access other htdocs folders other than your subdomain’s one.

5 Likes

I literally just fixed it 10 seconds ago haha you are totally right

1 Like

I was looking at the config paths and i noticed that it’s on the main home folder, which is not accessible by the subdomain, so I just had to reinstall and add my subdomain folder name and it worked normally, than I came here and was going to put a small tutorial but I saw your reply, you’re so fast!

2 Likes

I tend to use $_SERVER["DOCUMENT_ROOT"] in my php code to specify where htdocs is instead of hard coding it

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.