Hi,

I use drupal on an intranet, so the internet connections are made through a proxy,
Therefore, I installed this patch in my Drupal(for proxy http://drupal.org/node/735420), but the module still not working.

I used:

Debian Lenny
Apache 2.2
Php 5
Drupal 6.17
Weather 6.x-5.13

Drupal's Errors

file_get_contents() [function.file-get-contents]: connect() failed: No route to host en /var/www/drupal/sites/all/modules/weather/weather.module en la línea 2087.

file_get_contents(ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/SABE.TXT) [function.file-get-contents]: failed to open stream: Success en /var/www/drupal/sites/all/modules/weather/weather.module en la línea 2087.

fsockopen() [function.fsockopen]: unable to connect to weather.noaa.gov:80 (No route to host) en /var/www/drupal/sites/all/modules/weather/weather.module en la línea 2112.

CommentFileSizeAuthor
#4 weather_drupal_http_request.patch1.62 KBManonline

Comments

toddy’s picture

Assigned: Unassigned » toddy
Status: Active » Postponed (maintainer needs more info)

Hi,

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.

Regards,
Tobias

EmanueleQuinto’s picture

Well, the problem maybe is not directly related to the infamous #735420: Drupal 6 proxy server support, as from the reported errors and actual module code.

Let me clarify: the issue #735420 is related to the drupal function drupal_http_request that allows to change http requests adding support to proxy. Briefly, when the $proxy_not_required is TRUE and variables proxy_server and proxy_server are set ALL the requests are handled through the proxy (check the patches for details).

This module seems to use file_get_contents or curl or fsckopen directly.

So either you patch the module to add support for the proxy for file_get_contents using $context variable (check http://www.php.net/manual/en/function.file-get-contents.php#58758) or wait for the maintainer to change the module to handle requests with drupal_http_request. I don't know if this last option is possible indeed.

Manonline’s picture

+1 for proxy support

Manonline’s picture

StatusFileSize
new1.62 KB

This patch change the module to handle http requests with drupal_http_request.

The patch doesn't apply to the ftp protocol.

Manonline’s picture

Status: Postponed (maintainer needs more info) » Needs review
toddy’s picture

Status: Needs review » Fixed

Hi,

this is fixed now. There will be a new release shortly.

Regards,
Tobias

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

picacsso’s picture

Our proxy issue was caused by a drupal configuration under "Proxy Setting."
Inside /admin/settings/proxy the "Proxy host name" was pointing to the wrong server.

Once we redirected to the right server weather updates worked as expected.