This question already has an answer here:
I want to use cURL on my server, but it gives me the following error
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot
be activated when in safe_mode or an open_basedir is set in
/www/htdocs/w009663c/download/webapp/browser/pproxy.php on line 180
Warning: Cannot modify header information - headers already sent
by (output started at /www/htdocs/w009663c/download/webapp/browser/
pproxy.php:180)
in /www/htdocs/w009663c/download/webapp/browser/pproxy.php on line 242
{"status":{"http_code":301},"contents":""}
I requested the server admin to switch of safe_mode but he says that it is already switched off.
What else could cause this problem?
Maybe the second part of the error message:
or an open_basedir is set
Let me guess, you are using Plesk as control panel? Its Plesk that usually puts
open_basedir
setting...I'd assume open_basedir is set then and since that seems to be a shared server i'd assume they are not going to turn that off
Put
into a file and look at the output to see the configuration settings.
Maybe a workaround
Have a look at this comment of the curl-setopt manual:
http://php.net/manual/ro/function.curl-setopt.php#102121
Maybe that workaround works for you
There are a few workarounds listed in the manual pages for curl: http://www.php.net/manual/en/function.curl-setopt.php#102121
The other workaround would be to use PEAR Http_Request or Zend_Http.
Have you checked both open_basedir as well as safe_mode with ini_get()? They may actually not be turned off or you may have an open_basedir set.
If you're using plesk, this link may help: http://www.linuxweblog.com/plesk-vhost.conf