1
votes

I am executing curl post process in php to get response page content. i get this error

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /var/www/domain/httpdocs/housesearch.php on line 58

I followed several instruction like htaccess modification by adding below code in htaccess file

php_flag safe_mode off
php_flag open_basedir off
php_value open_basedir none

but again i had the same error.Can any one help me?

1

1 Answers

0
votes

This is one of the best comment's I've read in the PHP.Net manual. It explains why the issue is occurring, but not necessarily why.

When you use php_flag or php_value to change a setting, you are not changing the setting at the heart of PHP, rather at runtime. As a result, some settings cannot be detected or decoded by 3rd party API's or extensions.

You need to either make a hard change to your php.ini file, remove the open_basedir directive or use the 3rd party function included in the link above.