Curl and open_basedir/safe_mode?

WP-Filebase Pro Forums Remote Sync Curl and open_basedir/safe_mode?

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #574
    fafdk
    Participant

    Hi Fabian

    I have the following error when I try to remote sync:

    [05-Aug-2013 10:32:18] PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /var/www/web/wp-content/plugins/wp-filebase-pro/extras/amazons3/S3.php on line 2137

    I’m running with “open_basedir=on” my dev-host, as well using Fast-CGI. I do NOT have safe_mode on.

    I can see that you have the following in ../amazons3/S3.php:
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

    Someone here is suggesting a workaround:
    http://slopjong.de/2012/03/31/curl-follow-locations-with-safe_mode-enabled-or-open_basedir-set/

    I’m not a PHP guru, so I’m a little confused here.

    Is there something I can do to prevent the error, as I do not want to disable open_basedir?

    Thx

    FAF

    #576
    fafdk
    Participant

    I will move my dev-site to my host at the datacenter, to see if it can make it work a little better. Here at home I’m running an old Debian Squeeze, at the datacenter I have a CentOS 6 running. Furthermore I have 100Mbit/s there and 10Mbit/s here 🙂 – so the sync should perform better at the datacenter.

    At Amazon S3 I have a bucket full of folders with mp3’s, all sorted and all. When I sync with S3, all I get is one file per folder at most. It would be nice if I just could import the folder-tree as is, but I think the curl error is stopping the process.

    Thx for now.

    • This reply was modified 9 years, 4 months ago by fafdk.
    #578
    Fabian
    Participant

    Hi FAF,

    are there actually issues with the S3 sync? It should work fine, even with the warning, since S3 server does not usually redirect.

    I think commeting out the line

    //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

    in S3.php
    is better than the workaround because this makes 2 HTTP requests if open_basedir is on.

    Let me know if it works.

    Regards
    Fabian

    #582
    fafdk
    Participant

    Hi Fabian

    Yes, it runs a little more smooth with the option disabled. I still need to understand how the plugin utilizes the categories, which maybe is a part of my problem, so I need to read some more.

    Thank you for your answer.

    /FAF

    #589
    Fabian
    Participant

    Will be fixed with next update.
    /Closed

    #595
    fafdk
    Participant

    OK, thx. Didn’t see this message before writing in the setup section. Nice.

    /Closed 🙂

    #608
    fafdk
    Participant

    Thank you for fixing the issues, it looks good and works as intended. Also the Categories are created as they should. All in all a perfect update. Thx.

    /Closed

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.