0
votes

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in line 161 -- point to curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);

on local development it work just fine, but on web server it gave this error. I couldn't figure what is wrong with setopt?

1

1 Answers

2
votes

Your web host probably has PHP safe mode enabled, which restricts the functions that you can run.

A workaround can be found here:

http://www.edmondscommerce.co.uk/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode/