// set this for debugging -look for output in apache error log
//curl_setopt ($ch,CURLOPT_VERBOSE,1 );
// ensures any Location headers are followed
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ }
/**********************************************************
* Send the data out over the wire
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 36000);
// ensures any Location headers are followed
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ }
// Send the data out over the wire
//--------------------------------
// return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
// times out after 90 secs
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
+ }
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
// this line makes it work under https
curl_setopt($ch, CURLOPT_POSTFIELDS, $payflow_query);
curl_setopt($curl, CURLOPT_POSTFIELDSIZE, 0);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, FALSE);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, FALSE);
+ }
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
curl_setopt($ch, CURLOPT_VERBOSE, 0);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
+ }
if ($this->connectionTimeout !== NULL) {
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectionTimeout);
}
curl_setopt($this->_ch, CURLOPT_TIMEOUT, 20);
curl_setopt($this->_ch, CURLOPT_VERBOSE, 1);
curl_setopt($this->_ch, CURLOPT_FAILONERROR, 1);
- curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, 1);
+ if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+ curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, 1);
+ }
curl_setopt($this->_ch, CURLOPT_COOKIEJAR, "/dev/null");
curl_setopt($this->_ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($this->_ch, CURLOPT_USERAGENT, 'CiviCRM - http://civicrm.org/');