Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl settings break many shared hosts #614

Closed
benwerd opened this issue Dec 2, 2014 · 6 comments
Closed

Curl settings break many shared hosts #614

benwerd opened this issue Dec 2, 2014 · 6 comments

Comments

@benwerd
Copy link
Member

benwerd commented Dec 2, 2014

This error has been coming up a lot:

"CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set"

We need to test if open_basedir is set before setting this option.

@benwerd
Copy link
Member Author

benwerd commented Dec 4, 2014

I've committed a partial fix for this. Need to test.

@mapkyca
Copy link
Member

mapkyca commented Dec 15, 2014

It should be noted that there needs to be a similar fix applied to the mention client code. I'm wondering whether forking this to use the native webservices library might be smart...

mapkyca added a commit to mapkyca/idno that referenced this issue Dec 15, 2014
@Phyks
Copy link
Contributor

Phyks commented Jan 4, 2015

My 0.02$: I encountered the same issues in a recent project. Basically, curl in PHP can't follow locations if an open_basedir is set, for security reasons. That's a pretty standard issue, found in many other projects such as OwnCloud or Drupal.

AFAIK, the only way to mitigate such an issue is to write a custom wrapper to follow redirections (but there may be security risks).

Note: In PHP 5.6.3, warning is no longer issued if open_basedir is set and CURL_FOLLOWLOCATION is used. That is still the case in PHP 5.4.35.

@mapkyca
Copy link
Member

mapkyca commented Jan 4, 2015

It's a bit more subtle.... The known web services code does exactly that, however a number of third party modules use their own comms code (curl or otherwise) and so need to be modified to use known's web service code.

For mentions this requires a modification in the upstream project, however I'm starting to think we should fork the project.

@Phyks
Copy link
Contributor

Phyks commented Jan 4, 2015

True, I forgot about the external dependencies… mentions is the only external dependency that requires some modification, no ? Because for all the others, you seem not to be using the function \Idno\Core\Webservice::get in Known instead of the library-specific loading abilities.

mapkyca added a commit to mapkyca/idno that referenced this issue Jan 15, 2015
@benwerd
Copy link
Member Author

benwerd commented Aug 1, 2015

This hasn't come up again since last year, so I'm closing the issue.

@benwerd benwerd closed this as completed Aug 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants