tags:

views:

26

answers:

2

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/path/curl.php on line 594

I don't have access to php.ini. Can this be fixed without editing php.ini?

+1  A: 

See this comment in the manual. It provides an ugly workaround. I believe this restriction is effect because of a bug in the curl library where it would follow redirects to local resources, but that should be fixed by now, so I see no reason for this restriction.

Artefacto
Well that's an ugly hack for sure, but it works - basically, you will parse the response headers and redirect manually.
Piskvor
A: 

safe_mode belongs to PHP_INI_SYSTEM - so if that's the issue, you're out of luck, these items can only be set in php.ini and vhost config.

open_basedir belongs to PHP_INI_ALL, so you could set it in .htaccess using php_value.

Piskvor
I may be mistaken, but I think php_admin_value cannot be put in .htaccess files. Perhaps you mean php_value?
Artefacto
@Artefacto: You are correct, fixed. "php_admin_value (...) This can not be used in .htaccess files." http://php.net/manual/en/configuration.changes.php
Piskvor