Open_basedir restriction in effect for composer

fxwin.promissionsave.com

Warning : require_once(): open_basedir restriction in effect. File(/home/vol16_2/epizy.com/epiz_32176779/htdocs/vendor/autoload.php) is not within the allowed path(s):

I have the composer files on root domain, I have a subdomain that I want to use composer at …/…/htdocs
Cant I use it from subdomain? do I have to upload composer files twice? But and what about the inodes? Composer files takes more than 50% of allowed inodes.

Please help
Thanks

Welcome.

You cannot access files outside of the htdocs folder. So each subdomain and root domain cannot access files from other subdomains and root domains. This is for your own security, as there are hundreds of other websites hosted on the same server.

5 Likes

But they share the same usage limits, they’re in the same account.
Isn’t there a way to whitelist the composer folder?

No, there is not, unfortunately. There is a small chance that I am wrong with the previous statement though.

Could you maybe try using an absolute URL (subdomain.domain.tld/composer/file.extension)

2 Likes

The PHP code on a particular website is restricted to only access files within the htdocs folder of your website. There is no way PHP code from one htdocs folder can access files from another folder on the server, including the website folders of other domains on the same account. This is a security measure to make sure that if one website gets hacked, the other websites on your account are (mostly) safe.

The only option to share files would be to use parked domains. But you can’t do that with a subdomain.

6 Likes

There is no way off enabling allow_url_include?
Warning : require_once(): https:// wrapper is disabled in the server configuration by allow_url_include=0

allow_url_include will always be disabled for security reasons.

6 Likes

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