Hi there,

I don't get it. Why do you test a variable that has nothing to do with your module to validate some weird installation requirement?! If you want to make sure that the system can indeed access an external website, then check that you can access some website. If that fails, then generate an error. If it works, don't. All my sites work properly and can definitively generate HTTP requests (all the other modules that I have and do so work just fine! Including the update module that tells me properly that all of those modules are out of date...)

The error I get is from your linkchecker.install file on line 168.

      // Module cannot work without external HTTP requests.
      if (variable_get('drupal_http_request_fails', FALSE)) {
        $requirements['http requests'] = array(
          'title' => $t('HTTP request status'),
          'value' => $t('Fails'),
          'severity' => REQUIREMENT_ERROR,
          'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.'),
        );
      }

Comments

hass’s picture

Category: bug » support

How have you installed your D6 version - if this fails? Core system module also have this requirement. This check makes sure that drupal_http_request() work well. Without drupal_http_request() the module cannot work.

hass’s picture

Status: Active » Postponed (maintainer needs more info)

You may found a bug... are you able to replace

    if (variable_get('drupal_http_request_fails', FALSE)) {

with:

    if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {

... and report back, please?

hass’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Fixed

http://drupal.org/cvs?commit=230806

I wonder how others have installed the module without noticing this...

AlexisWilke’s picture

hass,

It may work if you install before you ever get an error in drupal_http_request_fails. I will let you know later whether this fix works. By commenting out that if() {} then I could install.

Thank you.
Alexis

Anonymous’s picture

I too had this problem when trying to install 6.x-2.1. Updating to the latest -dev fixed it.

AlexisWilke’s picture

hass,

Okay, I now tested with your fix and that works just fine.

Thank you.
Alexis

hass’s picture

THX... how bad that this flipped through my fingers... we need to fix #451456: 301 auto-update could break links for rolling a new release, but I really need help on this bug...

Songhak’s picture

Status: Fixed » Closed (fixed)

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

maxlee’s picture

Hello.

fyi. This is still occuring. I just installed the most recent version of D6 from the home page on WAMP server and received the HTTP request status fails message after running a Status Report. I ran the report after receiving a warning message on the Administration page after a "successful" installation.

The fix I finally found that was fairly straightforward was http://drupal.org/node/245990#comment-1312270

This is really problematic for people who are not coders (e.g. me). There was no reference to the error in the "error messages" section in troubleshooting.

himdel’s picture

Status: Closed (fixed) » Active

This bug is still present in current 6.x-2.x-dev and in 6.x-2.4.

It only appears if you're installing drupal (so empty database) with a profile that installs linkchecker.
The problem is not in variable_get but in variable_set that's called by system_check_http_request() which is called from linkchecker_requirements('install').

This patch fixes it.

--- a/linkchecker.install	2009-12-02 16:07:35.000000000 +0100
+++ b/linkchecker.install	2009-12-02 16:07:10.000000000 +0100
@@ -180,7 +180,7 @@
   switch ($phase) {
     case 'install' :
       // Module cannot work without external HTTP requests.
-      if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
+      if (variable_get('drupal_http_request_fails', TRUE) && !@system_check_http_request()) {
         $requirements['http requests'] = array(
           'title' => $t('HTTP request status'),
hass’s picture

You change only suppress errors from system_check_http_request()... It's no good coding practice to do this... and it's why a bug slipped unseen into Drupal 6.14 and also broken linkchecker (see project home for the linked case and the reason why using @ is bad).

hass’s picture

Status: Active » Postponed (maintainer needs more info)
hass’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)