0

I have just written a code which has worked well. It has got the data with CURL, I have run the .php file 2x times, but for the 3rd time I got this message all over the site: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in

I have NOT changed anything. What could be the problem? So it has worked well, than stopped working...

user1406071
  • 617
  • 4
  • 14
  • 24
  • Do you host this site, or is it hosted elsewhere? Someone might have changed a config somewhere. – Naftali Nov 06 '12 at 20:47
  • I'm hosting the site. Btw to be honest I have changed these in the php:Max Execution Time :100 Max Input Time : 100 But than I have changed them back and restarted the server. And still the same problem :( – user1406071 Nov 06 '12 at 20:50
  • Is `safe_mode` or `open_basedir` enabled in `php.ini`? – doublesharp Nov 06 '12 at 20:54
  • Safe mode is off and: ;open_basedir = This is what I have. – user1406071 Nov 06 '12 at 20:58
  • Is it possibly redirecting to a URL that is a `file://`? – doublesharp Nov 06 '12 at 21:11
  • nope, its something like: curl_setopt($ch, CURLOPT_URL,"http://***.com/api-get.php?$post_data"); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); – user1406071 Nov 06 '12 at 21:13
  • possible duplicate of [CURLOPT\_FOLLOWLOCATION cannot be activated](http://stackoverflow.com/questions/6918623/curlopt-followlocation-cannot-be-activated) AND http://stackoverflow.com/questions/3349280/php-replacement-for-safe-mode – Baba Nov 06 '12 at 21:54

0 Answers0