Hello, I'm receiving the following error message after I run cron.php:

warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /var/www/vhosts/socialactions.com/httpdocs/sites/all/modules/aggregation/aggregation.module on line 1036.

Not sure how to proceed. I looked around for Drupal Aggregation related support requests with this error message, but couldn't find any. I have a feeling my server may not be configured exactly correctly. But not I'm not sure how to troubleshoot the issue.

Peter

Comments

Ashraf Amayreh’s picture

Assigned: Unassigned » Ashraf Amayreh
Status: Active » Closed (fixed)

I don't know about the open_basedir, but safe mode is a directive that exists in your php.ini file which is almost all bad, you should worry about its value if you provide shared hosting on your server, otherwise, just turn it off.

Checkout this article

http://www.php.net/features.safe-mode

Let me know if this fixes your problem.

peterdeitz’s picture

Hi, Thanks for the quick reply. I've already turned off PHP SafeMode. The problem appeared after I did that. I get one error message for each feed I've added to Aggregation. The new feed items get imported correctly. The problem is the error message.

Do you think I need to comment out something on line 1036 of aggregation.module?

peterdeitz’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

re-opening the support request. just changing the status from closed to active.

Ashraf Amayreh’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

What about the open_basedir? Is it also set to NULL?

Same link I gave you talks about open_basedir, so it's worth a check.

It might be better for you to run phpinfo() rather than check these values in the configuration files as phpinfo() gives you the final evaluation of the directive's value. Some directives can be set in more than one location so checking one file or the other could be misleading.

This line could safely be commented out, but I'd rather not as it follows any redirects that are set up. Please make sure that safe_mode is off and that open_basedir is set to NULL using phpinfo(). If you do that and the error still appears, then just comment out the curl_setopt(CURLOPT_FOLLOWLOCATION, ...) that's causing the problem. Please let me know which solution succeeded in fixing this error.

peterdeitz’s picture

thanks for your help. the error message went away after I changed the open_basedir setting in one of the local configuration files. my server had no http.conf file and no basedir was declared in the server-level php.ini. There was a file called httpd.include in the /conf/ directory of my virtual domain, and that contained a reference to a basedir.

I changed that reference to:
php_admin_value open_basedir none

Thanks again for your your quick replies to my questions.

-peter

dsextonj’s picture

How do you set open_basedir to NULL? What is the exact coding?

Dale