Try moving curlopt_followlocation line between this:

PHP Code: 
if(ini_get('safe_mode')){
    
//Paste code here

This isn't a solution but it safer code to execute. I used to have the problem with a crawler I ran on another server.
Whoo Reviewed by Whoo on . cURL or PHP Problem. Hey, Restoring some forums tonight and after i bigdump the sql, and rebuild the language, i get this error while trying to post or see any old thread... " CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir " and then a big list of errors, from trying to shorten down the urls, or into bitly..vb2twitter mod..werid? I checked to see, but open_basedir = is blank and php safe_mode is off..? I have checked and see I have to do a bypass or something maybe >< Rating: 5