Page 1 of 1

CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 3:46 am
by mrvijayakumar
How can i solve this issue?

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/xxxxxx/public_html/curl.php on line 11
HTTP error: 301.

Any solution for this using htaccess or any other method?

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 4:36 am
by jackpf
I don't think you can modify this ini setting at runtime, since it's a security setting.

You have to disable open_basedir (I assume you have safe mode off anyway) in php.ini. Is it your own server?

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 4:39 am
by mrvijayakumar
Thanks for replying,

Yes, its my own server. This is possible only php.ini? If means what i want to change in php.ini?

And also, i don't have access to php.ini. What i can do? any solution.

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 4:49 am
by jackpf
If it's your own server, you can open and edit php.ini surely?!

where it has

Code: Select all

open_basedir = *something*
change that to

Code: Select all

open_basedir = none

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 7:24 am
by mrvijayakumar
Thanks for info, i contacted my web hoster to solve this issue. They solved it and give me. Thanks for guiding me.

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Posted: Fri Sep 18, 2009 7:25 am
by jackpf
Cool, no problem.