If you are seeing the following error after installing the buySAFE module: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir, this article will assist you.
This error is somewhat both a hosting/server configuration issue and a PHP/cURL issue.
If the PHP function phpinfo is executed:
<?php
phpinfo();
?>
You can check the "safe_mode" and "open_basedir" parameters. You will find that one or the other or both are set.
Because of a potential security hole, beginning with PHP version 4.4.4, if either of the above parameters are set, then PHP will not allow cURL to follow header location changes. As a result, the call: curl_setopt($handle, CURLOPT_FOLLOWLOCATION, 1) will fail.
Unfortunately, until cURL is updated to better handle file:// requests, there are only a couple of things to be done in this situation:
If you are on a shared host , or if you are the server administrator, but are unwilling/unable to unset the safe_mode and open_basedir server parameters, then the workaround is to comment that call out of the 2 files:
1. Make copies of the 2 files includes/classes/nusoap.php and admin/includes/classes/nusoap.php
2. Edit both files; line 2160, change:
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
to
//curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
This will disable cURL's ability to follow header redirects, but the buySAFE module should now work on your site.