CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
mrvijayakumar
Forum Commoner
Posts: 58
Joined: Tue Aug 18, 2009 12:39 am
Location: Chennai city, India
Contact:

CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post 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?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post 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?
User avatar
mrvijayakumar
Forum Commoner
Posts: 58
Joined: Tue Aug 18, 2009 12:39 am
Location: Chennai city, India
Contact:

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post 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
User avatar
mrvijayakumar
Forum Commoner
Posts: 58
Joined: Tue Aug 18, 2009 12:39 am
Location: Chennai city, India
Contact:

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post by mrvijayakumar »

Thanks for info, i contacted my web hoster to solve this issue. They solved it and give me. Thanks for guiding me.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode

Post by jackpf »

Cool, no problem.
Post Reply