User tests: Successful: Unsuccessful:
This PR cames from the problem identified in joomla-extensions/patchtester#111
This problem was identified in the patch tester but it's really a problem with any redirect with CURL on hosts with the conditions described (PHP open_basedir
enabled).
You will need to setup PHP with open_basedir
configured (go to php.ini
file and search for open_basedir and put, for instance, open_basedir = /your/joomla/site/path/:/tmp/
and restart php).
/your/joomla/site/path/libraries/joomla/http/transport/
and replace all the code in curl.php
file in that directory with this code https://raw.githubusercontent.com/andrepereiradasilva/joomla-cms/curl-followredirect-php-56/libraries/joomla/http/transport/curl.php
http://php.net/ChangeLog-5.php#5.6.0
Implemented FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode).
http://php.net/ChangeLog-5.php#5.2.0
Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are enabled. (Stefan E., Ilia)
http://php.net/ChangeLog-5.php#5.1.5
Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are enabled. (Stefan E., Ilia)
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
Title |
|
Title |
|
Title |
|
A similar change to solve this bug was already merged in Joomla Framework HTTP by mbabker.
joomla-framework/http@8f99ae6
Title |
|
Title |
|
Milestone |
Added: |
I tested this after having this exact issue testing #8645 on an installation on UKFast hosting.
I tested by following instructions above however the PHP on my installation was already set through PLESK php config to /var/www/vhosts/mydomain/:/tmp/ and checked as applied through System Info.
After installing J3.4.8 + Patchtester, I still couldn't install any patch.
Test this: Go to /var/www/vhosts/mydomain/libraries/joomla/http/transport/
and replace all the code in curl.php
file in that directory with this code https://raw.githubusercontent.com/andrepereiradasilva/joomla-cms/curl-followredirect-php-56/libraries/joomla/http/transport/curl.php
And then try to apply other patches in the patch tester.
Test with code provided works AOK.
@Bodge-IT please mark as tested https://issues.joomla.org/tracker/joomla-cms/8676 (after login the Test button appears). See https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results
I have tested this item successfully on 749acda
Tested succesfully on UKFAST.
This was tested on 3.4.4 not 3.4.8
open_basedir appeared to be set correctly as verified in PHP info but still couldn't Apply Patches
After swapping code in libraries/joomla/http/transport/curl.php with code provide by @andrepereiradasilva
Patch Tester worked.
UKFast Hosting: PHP: 5.4.45
OK Managed to replicate this issue on another server. Namesco.
Both these systems use Plesk to configure hosting.
In other test, UKFast, open_basedir was set to {WEBSPACEROOT}{/}{:}{TMP}{/} and couldn't apply patch.
On this test on Namesco server open_basedir was set to none and apply patches worked OK.
Setting it to the {WEBSPACEROOT}{/}{:}{TMP}{/} in PHP conifg broke patch tester. Applying the patch manually then fixed the issue.
I have tested this item successfully on 749acda
Tested on Namesco hosting.
Recreated issue by setting openbase_dir as per instructions.
New code worked like a charm.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-02-15 09:45:52 |
Closed_By | ⇒ | wilsonge |
Now patch work for all PHP versions (including PHP 5.5 or lower).
Test instructions updated and simplified.