indieweb / mention-client-php

Client library for sending webmention and pingback notifications
https://indieweb.org/webmention
97 stars 19 forks source link

Doesn't handle safe mode or open_basedir #15

Closed mapkyca closed 8 years ago

mapkyca commented 9 years ago

Basically, curl does some odd things in many hosted environments where basedir or safe mode are set - namely, CURLOPT_FOLLOWLOCATION is disabled... for some reason.

This causes problems on a number of hosts where this is enabled by default.

@benwerd's solution was to implement this in code, but that's not pretty in a library context. Perhaps having the ability to pass a send function to hand off to might be a way to go? I can of course just subclass...

(Refs idno/idno#629)

benwerd commented 9 years ago

Seconding this. We may subclass, but this is going to be an ongoing issue for people who use shared hosts, so it's worth considering a fix.

mapkyca commented 9 years ago

I sent a patch (#16) through that mods so get and post can be extended (change self to static + turn a few private methods to protected), this makes subclassing easier/possible so one can use one's own webservice calls to actually send things through.

Less than ideal, but maybe better than everyone under the sun implementing follow in code, which seems to be the implication of using curl or php's native fopen calls.

aaronpk commented 9 years ago

I assume this has been an acceptable solution so far? Is there anything else to resolve in this issue or can I close it?

benwerd commented 9 years ago

All happy at this end!