Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arhak’s picture

subscribing

roball’s picture

Category: bug » feature
FileSize
6.47 KB

I am sorry, but I just found that the patch posted above does NOT apply cleanly to D6.16. Thus, I am re-posting the original patch for D6.15 which works fine for both 6.15 + 6.16. Use this one instead!!!

dswan’s picture

Category: feature » bug

This does not seem to work for me on a freshly patched 6.15 install - no additional site configuration options become available using patch from #2

"patch" [New] 198L, 6625C written
user@host:~/public_html$ patch -p0 < patch
patching file includes/common.inc
patching file modules/system/system.admin.inc
patching file modules/system/system.module

So the patch was applied just fine... no joy. Tried a couple of times on a couple of installations - I really need this feature..

arhak’s picture

@#3 did you cleared the cache? I think it might need a menu rebuild

Slim Pickens’s picture

subscribe

mmilo’s picture

Category: feature » bug

subscribing

jjkd’s picture

I successfully installed this patch on Drupal 6.14 (with no patch issues). Cleared cache, I was then able to configure the proxy server parameters by going to admin/settings/proxy and entering the proxy information. I was then able to run the update process manually, and successfully received core and module update status information.

The proxy server I am using does not require authentication, so that element was not tested in my scenario.

jjkd’s picture

Ok, tested again on Drupal 6.16, patch installed with offset:

patching file includes/common.inc
Hunk #1 succeeded at 445 (offset 10 lines).
Hunk #2 succeeded at 468 (offset 10 lines).
Hunk #3 succeeded at 511 (offset 10 lines).
Hunk #4 succeeded at 558 (offset 10 lines).
Hunk #5 succeeded at 643 (offset 10 lines).
patching file modules/system/system.admin.inc
patching file modules/system/system.module

Still seems to work fine.

404’s picture

subscribing

whmitty’s picture

subscribing

BeMathis’s picture

subscribing, testing this on my site now.

marcingy’s picture

Category: bug » feature
Status: Active » Closed (duplicate)

Features are fixed in head and then back ported. Closing this as once #7881 is resolved a decision to back port will be taken.

EmanueleQuinto’s picture

Cleaned patch for drupal 6.16 AND pressflow 6.16.

Works without hunks

roball’s picture

Status: Closed (duplicate) » Active
davividal’s picture

Version: 6.16 » 6.17
FileSize
7.21 KB

I can confirm that this patch works for Drupal 6.17 without any modification.

But since line numbers differs, here is my patch.

bmenk’s picture

Trying to run the patch for a clean install of 6.17 gave me this error, so I switched to a clean install of 6.16 and that gave me the same error.

patching file includes/common.inc
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

Sorry I don't know enough about patching core files to understand what this means nor how to fix it. Thanks for any help you can give.

Bobb Menk
MIT Lincoln Laboratory Library

dmitry_bezer’s picture

I had the same problem with patch on a windows machine, solved by replacing windows line endings (\r\n) with *NIX onces (\n) in the patch file. Looks like a patch utility bug

bmenk’s picture

Thanks for the quick response. This is indeed on Windows (forgot to say that up front).

After saving the patch file with *NIX line endings I get a new issue:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/includes/common.inc b/includes/common.inc
|index 726ca52..93a693f 100644
|--- a/includes/common.inc
|+++ b/includes/common.inc
--------------------------
File to patch:

My test command looked like this:

patch -b -p0 --dry-run < proxy6.17.patch

Any further ideas from anyone?

Thanks.

Bobb Menk

arhak’s picture

for #16 the solution is #17
for #18 you should use -p1 to strip the leading a/ & b/ starting directories
(patch should be done for -p0, but it isn't, so use -p1 instead)

EmanueleQuinto’s picture

Cleaned patch for drupal 6.17 AND pressflow 6.17.85

Works without hunks.

bmenk’s picture

I finally got this to work, but am detailing what I did as it hasn't been this difficult to do in earlier versions on this same machine. It would be nice if it were a bit less convoluted - perhaps someone could tell me what's going wrong here?

Installing on Windows host, Apache2, PHP 5.x MySQL 5.x
Windows line feeds replaced with UNIX line feeds by saving with that option using Dreamweaver.

Used the patch as found in #15 above. The patch in #20 gave me identical results to the patch in #15.

Command issued as follows:

"C:\Program Files\Apache Group\Apache2\htdocs\drupal6>"c:\program files\gnuwin32\bin\patch" -b -p0 < proxy6.17.patch

This returns the error: "can't find file to patch at input line 5"

So I stripped the leading "a/ & b/" as recommended in #19 from both the "diff --git" lines and from the "--- a/includes/common.inc" "+++ b/includes/common.inc" lines as well as the same combinations found further down in the patch for the changes to "/modules/system/system.admin.inc" and "/modules/system/system.module"

This gave me the same hunk error as before: "Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354"

I then tried using -p1 instead of -p0 in the command line using a different copy of the patch that included the leading "a/ & b/".

That took me back to the "can't find file to patch" error.

So I went back to the version of the patch with the leading "a/ & b/" stripped out again. This time I manually typed the files to be patched each time it prompted me to do so. That meant telling it "includes/common.inc" for the first 3 prompts, then "modules/system/system.admin.inc" for the next prompt, and finally "modules/system/system.module" for the final prompt.

I then ran update.php logged in and found the proxy options available in Administer > Site Config > Proxy Server

I noticed that the patch only actually worked when the path was the relative "includes/common.inc" etc. rather than "/includes/common.inc" I did try stripping the leading a/ & b/ to leave both versions of the path to the files to be patched, but neither would run the patch without manual intervention.

Thanks to anyone who can point up what's going wrong here and make it easier for we Windows people next time around ;)

Bobb Menk

meetai’s picture

This read awesome. Tried it on my conf and didn't worked. Does anybody have experience working with Tor (http://www.torproject.org)? How would this be made work through Tor or a socks proxy server (I get "Tor is not an http server")?

alekas’s picture

I use drupal on an intranet, so the internet connections are made through a proxy.
I installed successfully the patch, after I tried with "linkchecker" module and work well, But, when I try with the "Weather" modulo, doesn't work.

So, I open the issue for this module(Weather), but his maintainer, says this:

unfortunately, I cannot do anything about this, as I don't know what setup you use exactly. Please try to solve this within the bug report you've mentioned above #735420: Drupal 6 proxy server support. When you know how to solve the problem, feel free to post this here.

More in this link:
http://drupal.org/node/847344

Then, here is my question, What can I do? Someone can guide me, please.

brt’s picture

subscribing

Anonymous’s picture

FYI - just installed and run on 6.19. All working fine. S

EDIT: I am working with this (http://drupal.org/node/735420#comment-3085774) version btw.

joelstein’s picture

Version: 6.17 » 6.19
Status: Active » Needs review
FileSize
641 bytes
3 KB
2.55 KB

These patches also work for me. Here are cleaned up versions, without the "PROXYHACK" comments, and split out into their own files. Works for me on 6.19.

Status: Needs review » Needs work

The last submitted patch, system.module.patch, failed testing.

joelstein’s picture

FileSize
3.01 KB

I changed one thing to system.admin.inc: made the password field an actual '#password' type field.

roball’s picture

Patch from #20 works totally fine as is for D6.19:

[root@anet drupal]# wget http://drupal.org/files/issues/proxy.drupal.6.17_0.patch
[root@anet drupal]# patch -p0 < proxy.drupal.6.17_0.patch
patching file includes/common.inc
patching file modules/system/system.admin.inc
patching file modules/system/system.module

So no need to make things more complicated in splitting up one patch into 3 separate files.

joelstein’s picture

Status: Needs work » Needs review
FileSize
7.38 KB

Understood. Since I did make a change (in #28 above), I'm submitting a new patch, all in one file. Also, this patch does not include the "PROXYHACK" comments. Hopefully it passes testing.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.19.patch, failed testing.

ta5ae’s picture

Status: Needs work » Needs review

#20: proxy.drupal.6.17.patch queued for re-testing.

ta5ae’s picture

#15: proxy.drupal.6.17.patch queued for re-testing.

adrien.gibrat’s picture

#30: proxy.drupal.6.19.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.19.patch, failed testing.

Hitmrrr’s picture

Status: Needs work » Needs review

#30: proxy.drupal.6.19.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.19.patch, failed testing.

ndm’s picture

Status: Needs work » Needs review

6.19 works for me and this functionnality must be implement.

It's horrible to patch the core for each install!!!!

Another question is why the test failed, the description is very limited... Do a guru have an idea?

dstern350’s picture

Priority: Normal » Major

Does this patch support the News Aggregator module? I applied it to 6.19 and it is not reaching out to the Internet (I confirmed that with tcpdump)

sblommers’s picture

mrios’s picture

#30: proxy.drupal.6.19.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.19.patch, failed testing.

axle_foley00’s picture

I tested the proxy.drupal.6.19.patch on one of our servers and it work fine.

joelstein’s picture

Version: 6.19 » 6.20
Status: Needs work » Needs review
FileSize
7.38 KB

Okay, here's the latest version for 6.20. Hopefully this one passes. :)

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.20.patch, failed testing.

Omicrown’s picture

Status: Needs work » Needs review
FileSize
7.66 KB

Patch for 6.20 to suppport proxy.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.20.patch, failed testing.

FrankT’s picture

Applying the path with cygwin caused the following output on my PC (Drupal 6.20 of course, patch in the root directory of the Drupal website):

# patch -p0 < proxy.drupal.6.20_0.patch
patching file includes/common.inc
Hunk #3 succeeded at 469 with fuzz 1 (offset 1 line).
patching file modules/system/system.admin.inc
patching file modules/system/system.module
Hunk #1 FAILED at 1.
1 out of 3 hunks FAILED -- saving rejects to file modules/system/system.module.r
ej

I do not have the skills to find the error but I hope it helpes somebody else...

ungesaeuertesbrot’s picture

FileSize
7.66 KB

A patched patch. The original patch was apparently created from a version of drupal different from 6.20.

roball’s picture

@ #48, 51: Why do you post yet another patch for D6.20? The patch from #46 is working fine. And why did you change Drupal core's version number to 6.21-dev?

Omicrown’s picture

Yes, the patch for d6.20 from #46 is working fine. But there was a desire to pass SimpleTest, which uses d6.21-dev.
Look for details of the test:
Detect a non-applicable patch
Ensure the patch applies to the latest checkout of the code-base.

FrankT’s picture

I'm not sure any more whether I used patch #46 or #48 when writing #50, but #51 worked for me. Thanks.

ahmed.sajid’s picture

Status: Needs work » Needs review

#15: proxy.drupal.6.17.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, proxy.drupal.6.20_0.patch, failed testing.

ahmed.sajid’s picture

Hi,

Is there a proxy patch for drupal 7?

Regards,
Ahmed.

ahmed.sajid’s picture

Status: Needs work » Needs review

#46: proxy.drupal.6.20.patch queued for re-testing.

pwolanin’s picture

@ahmed - see the OP. Drupal 7 patch at #7881: Add support to drupal_http_request() for proxy servers (http not https)

@ALL - please put the -D6 suffix on your Drupal 6 patches to avoid having the testbot try to run it. Drupal 6 patches can not be automatically tested at this point.

OldCode101’s picture

#46: proxy.drupal.6.20.patch queued for re-testing.

decibel.places’s picture

Does anybody have a patch prepared for pressflow-6.20.97 ? earlier pressflow patches do not match

(I asked Four Kitchens to include proxy server support in Pressflow)

hl333’s picture

bnysten’s picture

Version: 6.20 » 6.22

I recently update my site from drupal 6.20 to 6.22. I did not managed to download the proxy patch for Drupal 6.22. Is it available yet or will it be soon ? May I apply the 6.20 patch ?

Pol’s picture

Status: Needs review » Reviewed & tested by the community

Hello,

The patch #46 is working successfully with Drupal 6.22, we are using it.

Thanks !

decibel.places’s picture

re #64

mybad - patch works fine in 6.22

Pol’s picture

We are using continuous integration system (Jenkins) and the patch is still successfully applied with Drupal 6.22.

Can you paste (use pastebin.com) the result of your command and report back here ?

valthebald’s picture

Version: 6.22 » 6.x-dev

Should that be assigned to 6.x-dev to be included to the next 6.x release?

thomasmurphy’s picture

This is clearly hard to fix on a core level, and applying the patch to every update isn't very efficient (much respect to people offering patches, though). Has anyone found other solutions to this problem before, e.g. Apache, PHP or OS fixes that achieve the same end? People must have resolved this before in enterprise drupal deployments? here's hoping!

PieterDC’s picture

proxy.drupal.6.20.patch from #46 works for me, with Drupal 6.22
thanks

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Postponed

The latest provided patch is clearly not committable. It has PROXY_HACK splintered all over it and the feature is not yet in Drupal 8 even (#7881: Add support to drupal_http_request() for proxy servers (http not https)). We usually do not add new features to older (stable) versions of Drupal core, except when they land in later (stable + development) versions and it is deemed important to backport. If we'd add it in older releases, we'd loose out on the developer power that is testing it more on current versions (as well as automated testing in Drupal 7). Please reopen if #7881: Add support to drupal_http_request() for proxy servers (http not https) lands in Drupal 8 and 7.

ducdebreme’s picture

following

Pol’s picture

Dude, there is no need to write a comment to follow a thread.

They made that button to avoid such kind of comments... please understand !

Patrizio’s picture

FileSize
16.18 KB

I've backported the work on D7/8
Apply on commin.inc

decibel.places’s picture

Thanks Patrizio!

For clarity, we should note the patch applies to /includes/common.inc

(fortunately I do not have firewall issues at my present environment)

-----------------------------------------------

@Pol I think the "Following" button is unclear, when people are used to posting "Subscribe" - the button should say "Subscribe to follow updates to this thread" then everybody would understand (yeah, this should be posted on a different thread)

masterv-1’s picture

If its to get drupal updates to return results - try this script I ended up writing for a version 6.2X which failed with all patches.

custom perl update list script

also here

Hope it helps. It simply checks update xml and checks local version for any that are out of date depending on how you set up cron once a week for general changes and daily for security updates. It emails csv and html file attachment.

Can be used for any version of drupal - configurable in config file

alekas’s picture

Version: 6.x-dev » 6.24
Status: Postponed » Active

I recently updated my site from drupal 6.22 to 6.24.

I am looking for the patch for version 6.24, but I have not found yet. The patch will be available soon?

I tested the patch proxy.drupal.6.20.patch from #46, but did not work.

pwolanin’s picture

Version: 6.24 » 6.x-dev
Status: Active » Postponed

see comment #70

alekas’s picture

Version: 6.x-dev » 6.24
Status: Postponed » Needs review

After applying patch, I found out some missing lines in includes/common.inc
Commented lines at 480, and add the patch lines before it.

 /*patch por proxy.*/
 480       $port = isset($uri['port']) ? $uri['port'] : 80;
 481       $host = $uri['host'] . ($port != 80 ? ':'. $port : '');
 482       $proxy_not_required = is_in_no_proxy_list($uri['host']);
 483       if ((variable_get('proxy_server', '') != '') && (FALSE == $proxy_not_required)) {
 484         $proxy_server = variable_get('proxy_server', '');
 485         $proxy_port = variable_get('proxy_port', 8080);
 486         $fp = @fsockopen($proxy_server, $proxy_port, $errno, $errstr, 15);
 487       } else {
 488         $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
 489       }
 490  
 491       break;
 492 
 493 /* patch por proxy.
 494       $port = isset($uri['port']) ? $uri['port'] : 80;
 495       $host = $uri['host'] . ($port != 80 ? ':'. $port : '');
 496       $fp = @fsockopen($uri['host'], $port, $errno, $errstr, $timeout);
 497       break;
 498 */
jrz’s picture

Sub...

decibel.places’s picture

@Panchoj

There is a "Following" link at the top of issues so you can subscribe without cluttering the thread with a post just to subscribe.

If you agree that it needs to be presented better so people understand what it is and how to use it, you can comment here #1376380: "Following" button purpose and use may be unclear

denix’s picture

#73: diff.patch queued for re-testing.

Pol’s picture

FileSize
7.12 KB

Hello,

Here's a port of the patch for Drupal 6.25.

dmuller’s picture

I love the encouraging green bar and the fact that the patch passed 190 simple tests... but it won't apply to my drupal instance.

[root@stackb drupal]# patch -p0 < proxy.drupal.6.25.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/includes/common.inc b/includes/common.inc
|index 07be8e7..231b916 100644
|--- a/includes/common.inc
|+++ b/includes/common.inc
--------------------------
File to patch:

Pol’s picture

Try with git apply :-)

apodran’s picture

root@stackb drupal]# patch -p0 < proxy.drupal.6.25.patch

Try to use the following:
# patch -p1 < proxy.drupal.6.25.patch

dmuller’s picture

Yes thank you, that worked.

I guess there's a lot I don't know about patch. :/

axle_foley00’s picture

#82: proxy.drupal.6.25.patch queued for re-testing.

axle_foley00’s picture

I can confirm that proxy.drupal.6.25.patch also works with Drupal 6.26.

jstoller’s picture

#82 seems to be working with Drupal 6.28.

euk’s picture

Confirm!
Works on 6.28!

Thanks for the patch!

jstoller’s picture

Status: Needs review » Reviewed & tested by the community

Seems tested to me.

philippejadin’s picture

#82: proxy.drupal.6.25.patch queued for re-testing.

ea2391’s picture

Issue summary: View changes

I applied the proxy.drupal.6.25.patch to the 6.30 Core and it was applied well (except the offsets :) ).

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 82: proxy.drupal.6.25.patch, failed testing.

munkiepus’s picture

I just applied this https://drupal.org/files/proxy.drupal.6.25.patch to v 6.32 and can confirm it works (after clearing the drupal cache)

13:23:23 $ patch -p1 < proxy.drupal.6.25.patch
patching file includes/common.inc
Hunk #1 succeeded at 455 (offset 3 lines).
Hunk #3 succeeded at 519 (offset 3 lines).
Hunk #5 succeeded at 667 (offset 5 lines).
patching file modules/system/system.admin.inc
patching file modules/system/system.module

zaphoyd’s picture

Patch in #82 appears to still work with 6.33

Status: Needs work » Needs review

tchevass queued 82: proxy.drupal.6.25.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 82: proxy.drupal.6.25.patch, failed testing.

pgdagenais’s picture

Status: Needs work » Needs review

Work with Drupal 6.35 !

09:34:45 $ patch -p1 < proxy.drupal.6.25.patch
patching file includes/common.inc
Hunk #1 succeeded at 461 (offset 9 lines).
Hunk #2 succeeded at 487 (offset 9 lines).
Hunk #3 succeeded at 525 (offset 9 lines).
Hunk #4 succeeded at 543 (offset 9 lines).
Hunk #5 succeeded at 673 (offset 11 lines).
patching file modules/system/system.admin.inc
patching file modules/system/system.module

EDIT : 24 aug -- Also work with drupal 6.36 / 6.37

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.