This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
When I try to install the CGGStudio.Loading plugin, I get the following error:
"curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set" on line 233 of /var/www/vhosts/mydomain.com/httpdocs/vendor/october/rain/src/Network/Http.php
How can I fix this?
Last updated
The problem seems to be that "open_basedir" has been set in php.ini file. So, the only workaround to this problem is removing this line from php.ini fie. But, removing this would cause security risks:
For a real eye-opener, read this report on thousands of sites that allowed Google to index the results of phpinfo(). Don't make this mistake on your site! The report includes alarming statistics on the percentage of sites that use deprecated settings such as register_globals ON or that don't have open_basedir set at all: By the way, if phpini and register_globals are unfamiliar terms you are probably not ready to securely manage your own site.
So if setting open_basedir to empty is a security mistake, how can I install the OctoberCMS plugins without making my site vulnerable? Even if setting this variable to empty is the only solution, I do not have access to php.ini file to change it, because I am on a shared hosting. The php version I am using is 5.4.
OctoberCMS creators, please advise!
Last updated
You need to unset open_basedir for curl_setopt to work. So your only hope is if your hosting provider allows you to override the php.ini file. Sometimes you are allowed to do that by adding one to your root folder but you would need to check with them if this is allowed.
If you are concerned about security then use of .htaccess options (there is a good default supplied with October) should be good enough.
Meysam,
I have the exact same problem for a client. For multiple reasons I had no choic thant make the site on his shared hosting. The support give me a solution, here, but updates will erases modifications, so I will try to make a PR after I solved the problem locally.
If you have find another solution I would like to hear it !
Okay in fact, go to /vendor/october/rain/src/Network/Http.php and modify the line 246 from:
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
to:
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
And you should be able to update and install plugins. For now I don't now why.
Last updated
Changed the line 246 to false like you said above, but when I want to attach my project to the backend, it still says:
"curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set" on line 246 of
Does someone knows more about this topic?
1-9 of 9