amiadogroup/xmpp-prebind-php — Issue #3: cURL follow on location functionality and open_basedir or safe mode error
Author: davidvandertuijn
Created: 2011-12-07 20:09:04+00:00
State: open

cURLfollow on location functionality needs cannot be activated when safe_mode is enabled or an open_basedir is set, else the Kohana framework throws this error:

ErrorException [ Warning ]: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set

There is a workaround in XmppPrebind.php:

// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
}