warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/a2hlogic/public_html/test/sites/all/modules/feeds/libraries/PuSHSubscriber.inc on line 75.

this is what I get on a FRESH Drupal install.

Comments

alex_b’s picture

Version: 6.x-1.0-alpha12 » 6.x-1.x-dev

Can you disable safe_mode in your setup?

I have not tested Feeds against PHP deployments in safe mode. Neither do I plan to do so (it's being deprecated). I wouldn't be surprised if there are more features in Feeds that require safe mode to be off.

At least we should add to requirements that safe_mode is not supported.

Setting to -dev as all versions of Feeds are affected.

drupallogic’s picture

well just testing actually. when my host updates to PHP 5.3 should be solved.

I decided to stay with FeedAPI actually, I need taxonomy mapping.

alex_b’s picture

taxonomy mapping is part of Feeds - you mean taxonomy inheritance right?

drupallogic’s picture

yes, taxonomy inheritance.

alex_b’s picture

I've added a note in the readme file's requirements

- PHP safe mode is not supported, depending on your Feeds Importer configuration
  safe mode may cause no problems though.
klonos’s picture

readmes are good and should be read as their name states, but we all know most people don't read them and the rest but few simply speed-read through them :(

How about adding a check in the code and if safe mode is enabled, then a warning shown to explain the situation to the users (instructions or links to solution/workaround as well perhaps?) instead of the error thrown at their face? This is from php.net:

<?php
// Check for safe mode
if( ini_get('safe_mode') ){
    // Do it the safe mode way
}else{
    // Do it the regular way
}

?>

I propose to change title to 'check for php safe mode', change this to a task and set it to either minor or postponed and get back to it when time permits.

If you agree, I believe that the warning should be placed on the Feeds admin page and perhaps the site's status page as well. The warning should be something like:

PHP safe mode detected! This might cause issues with some Feeds Importer configurations. Also, safe mode is deprecated in PHP 5.3.0 and is removed in PHP 6.0.0. Please consider disabling php safe mode. To do this, edit your php.ini file and change the line safe_mode = On to safe_mode = Off. Then restart your web server.

alex_b’s picture

Title: CURLOPT_FOLLOWLOCATION error » CURLOPT_FOLLOWLOCATION error - implement hook_requirements()

#6 Adding a warning on the admin UI is a good call. Let's use hook_requirements for it. The warning would then show up on Drupal's system status page.

alexfisher’s picture

Getting this same error, but I'm not running PHP in safe mode. Have confirmed this via phpinfo() function.

Even with this error, though, some feeds will import while others refuse.

Also testing on fresh 6.15 installs.

alexfisher’s picture

Alright, so I misunderstood the other half of the equation. There was a local open_basedir var set and I realized after some digging it needed to have no value. Modified Apache config so no open_basedir was set and error is gone.

For anyone else having this issue, I found the following line in TWO PLACES within my apache config at /etc/apache2/apache2.conf:

php_admin_value open_basedir "/var/www/myusername/data:."

Looking forward to getting more intimate with this module now. ;-)

alex_b’s picture

BTW If you don't use PuSH, it won't cause an error in PuSHSubscriber .inc as of 6.x-1.x-dev anymore. This may deal with this issue for most people.

arski’s picture

hmm, won't unsetting open_basedir cause issues for some other modules, like credit card stuff in Ubercart?

And is there a way to unset it through .htaccess? My PuSHSubscriber seems to still complain about it (and i have safe_mode off, so it has to be that)

arski’s picture

my apologies, disabling this restriction will actually solve the cc key storage issue :)

twistor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)