WP-Filebase Pro › Forums › Remote Sync › Curl and open_basedir/safe_mode?
Tagged: curl, open_basedir
- This topic has 6 replies, 2 voices, and was last updated 11 years, 3 months ago by fafdk.
- AuthorPosts
- 2013-08-05 at 12:06 #574fafdkParticipant
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
2013-08-05 at 16:39 #576fafdkParticipantI 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 11 years, 4 months ago by fafdk.
2013-08-05 at 19:15 #578FabianParticipantHi 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
Fabian2013-08-06 at 08:46 #582fafdkParticipantHi 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
2013-08-06 at 19:45 #589FabianParticipantWill be fixed with next update.
/Closed2013-08-07 at 07:37 #595fafdkParticipantOK, thx. Didn’t see this message before writing in the setup section. Nice.
/Closed 🙂
2013-08-09 at 10:21 #608fafdkParticipantThank 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
- AuthorPosts
- You must be logged in to reply to this topic.