? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
29 Apr 2014

Certain environments with PHP's safe_mode or open_basedir options set can cause errors with the cURL adapter. Users will get a message similar to Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /libraries/joomla/http/transport/curl.php on line 159.

Edit: Tracker - http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29475

avatar mbabker mbabker - open - 29 Apr 2014
avatar dbhurley
dbhurley - comment - 29 Apr 2014

:+1: Looks good to me.

avatar zero-24
zero-24 - comment - 29 Apr 2014
avatar mbabker mbabker - change - 29 Apr 2014
Title
Check for safe_mode or open_basedir in the cURL adapter
[#29475] Check for safe_mode or open_basedir in the cURL adapter
avatar zero-24
zero-24 - comment - 29 Apr 2014

Also i think we can close this: #1500 if favor of this one. :+1:

avatar dbhurley dbhurley - reference | - 29 Apr 14
avatar dbhurley dbhurley - merge - 29 Apr 2014
avatar dbhurley dbhurley - close - 29 Apr 2014
avatar dbhurley dbhurley - change - 29 Apr 2014
The description was changed
Title
Check for safe_mode or open_basedir in the cURL adapter
[#29475] Check for safe_mode or open_basedir in the cURL adapter
Description <p>Certain environments with PHP's <code>safe_mode</code> or <code>open_basedir</code> options set can cause errors with the cURL adapter. Users will get a message similar to <code>Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /libraries/joomla/http/transport/curl.php on line 159</code>.</p> <p>Certain environments with PHP's <code>safe_mode</code> or <code>open_basedir</code> options set can cause errors with the cURL adapter. Users will get a message similar to <code>Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /libraries/joomla/http/transport/curl.php on line 159</code>.</p> <p>Edit: Tracker - <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=29475">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=29475</a></p>
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-04-29 16:29:21
Labels Added: ? ?
avatar dbhurley dbhurley - close - 29 Apr 2014
avatar beat
beat - comment - 29 Apr 2014

Wow, 1 hour between PR and merge without tests and without chance of discussion ?

What's going on here ? Why are Joomla QA processes not followed here ?

Are PLT members above the processes they impose on the community, or are they not also members of the community ?

Don't want to not say Thank You for all your hard work, but this is a rush-in:

This will silently break webservices (right now they break but there is a warning message that allows to fix the server config or change hoster).

Additionallly there are valid workarounds to implement at same time than silencing this warning:

1) http://edmondscommerce.github.io/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode.html
2) http://www.php.net/manual/en/function.curl-setopt.php#102121

See discussions on Drupal and OwnCloud threads:
https://drupal.org/node/1699868
owncloud/core#1916

Any thoughts ?

avatar mbabker
mbabker - comment - 29 Apr 2014

Without creating functions to mock what this single option does, this is a
good enough solution IMO. To me, this PR isn't "silencing an error", but
rather properly checking a server configuration and disallowing code to
execute if the configuration will cause a warning and prevent the expected
result.

If you would like to propose an alternate solution, please do so. The fix
provided is one I've been using in a forked version of this class which is
shipped with a module interfacing with the Twitter API and I've not
experienced issues with it.

As to your process concerns, not a decision I made and I'm not getting into
that discussion at this time.

On Tuesday, April 29, 2014, beat notifications@github.com wrote:

Wow, 1 hour between PR and merge without tests and without chance of
discussion ?

What's going on here ? Why are Joomla QA processes not followed here ?

Are PLT members above the processes they impose on the community, or are
they not also members of the community ?

Don't want to not say Thank You for all your hard work, but this is a
rush-in:

This will silently break webservices (right now they break but there is a
warning message that allows to fix the server config or change hoster).

Additionallly there are valid workarounds to implement at same time than
silencing this warning:

1)
http://edmondscommerce.github.io/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode.html
2) http://www.php.net/manual/en/function.curl-setopt.php#102121

See discussions on Drupal and OwnCloud threads:
https://drupal.org/node/1699868
owncloud/core#1916 owncloud/core#1916

Any thoughts ?


Reply to this email directly or view it on GitHub#3534 (comment)
.

avatar beat
beat - comment - 29 Apr 2014

Thanks Michael :-) Obviously, you followed the process by doing a normal PR. :-)

You have no issues with Twitter API today. But e.g. in 6 months from now Twitter does a redirect and your applications suddenly fails while it shouldn't fail. Most webservices change their URLs over time, and most do use redirects to keep the web ticking.

Now without such a warning, go guessing why a service doesn't work. It's an useful error message showing an incompatible server config.

Imho, the proper fix is to follow urls with alternate methods like the 2 I linked to at same time than fixing this warning. But it requires testing and can't be rushed into a release same day as packages are built.

avatar dbhurley
dbhurley - comment - 29 Apr 2014

@beat I would recommend following up with code of your own if you propose a more thorough solution. :) This works well for the current situation. Other solutions may exist, and your PR's are welcome.

avatar beat
beat - comment - 29 Apr 2014

@dbhurley Sure thing, but sure not in a release-day rush, and sure not without following processes in place :wink: !

avatar dbhurley
dbhurley - comment - 29 Apr 2014

I would expect nothing else. I'll watch for your PR.

avatar Bakual Bakual - reference | d621835 - 12 May 14
avatar mbabker mbabker - head_ref_deleted - 29 May 2014

Add a Comment

Login with GitHub to post a comment