Hi guys, I don't know if the server guys changed anything but I suddenly got
Notice: Undefined offset: 1 in drupal_http_request() (line 989 of /home/fivestor/public_html/demo8/includes/common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 993 of /home/fivestor/public_html/demo8/includes/common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 993 of /home/fivestor/public_html/demo8/includes/common.inc).
On all my websites at that server. Can you please tell me why this would happen and how I can ask them to repair whatever it it causing these errors?
Any help would be appreciated.
Regards
Rick
Comment | File | Size | Author |
---|---|---|---|
#7 | Image 001.png | 58.23 KB | drupauler |
#5 | devel2.jpg | 119.39 KB | rickharington |
#5 | devel3.jpg | 68.2 KB | rickharington |
#4 | devel.jpg | 47.98 KB | rickharington |
Comments
Comment #1
bappa.sarkar CreditAttribution: bappa.sarkar commentedI think the url you are fetching is not available or your server not able to request the URL.
Comment #2
rickharington CreditAttribution: rickharington commentedHi bappa.sarkar
Thank you for the reply. This is happening on all my sites. Any idea how I can fix that?
Thanks for the help.
Comment #3
bappa.sarkar CreditAttribution: bappa.sarkar commentedInstall devel module.
goto /devel/php
dsm(drupal_http_request('http://www.google.com/'));
Press Execute.
expand the output and take the screen shot and attach here.
Comment #4
rickharington CreditAttribution: rickharington commentedHi bappa.sarkar
Thank for getting back to me. This is what I got.
Comment #5
rickharington CreditAttribution: rickharington commentedSorry I forgot to expand
Comment #6
bappa.sarkar CreditAttribution: bappa.sarkar commentedYou didn't got any PHP Notice when you are fetching google.com.
Can you follow #3 for the URLs for which you are receiving PHP Notices?
Comment #7
drupauler CreditAttribution: drupauler commentedSame here, but when I create a new system on a hosted account with cpanel). Existing systems work fine.
My procedure is create a new subdomain, clone a working drupal system into the hitherto empty subdomain folder, create aDB and update settings.php to reference it, then run install.php.
reports/status reports
Notice: Undefined offset: 1 in drupal_http_request() (line 989 of /home/sites/paudax.com/public_html/dev3/includes/common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 993 of /home/sites/paudax.com/public_html/dev3/includes/common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 993 of /home/sites/paudax.com/public_html/dev3/includes/common.inc).
and
Error
HTTP request status Fails
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. If you are certain that Drupal can access web pages but you are still seeing this message, you may add $conf['drupal_http_request_fails'] = FALSE; to the bottom of your settings.php file.
Report from devel attached (image 001) as above. Any pointers would be helpful!
Comment #8
drupauler CreditAttribution: drupauler commentedredacted
Comment #9
Rory.Davies CreditAttribution: Rory.Davies commentedI got the same set of messages as #7 when updating core from 7.22 to 7.26.
I tried fiddling with includes/common.inc (as suggested in some threads about Drupal parsing variants in the HTTP response header) but that made no difference.
I updated my settings.php to the 7.26 template (mine was way older) and that made no difference either.
I checked that modules could be updated, then added the line to it as suggested ($conf['drupal_http_request_fails'] = FALSE;). Both sets of error messages disappeared.
So I presume that a) whatever is testing for the second error message does something which also causes the first set, and b) adding the flag in settings.php skips that test so neither error is reported.
Luckily, the language used in the second error message suggests it might be related to the first. Otherwise I would still be trying to fix what looks like a major error before I worried about what seems a less important one.
If it's possible to prevent the second test triggering both error messages, that would be good. I'm sorry I'm nowhere near competent to help with that.
Comment #10
ravi_admec CreditAttribution: ravi_admec commentedhi friends,
before few days, i faced the same issue.
I searched out a lot but nothing found.
Generally i don't have time to put the solution but today i felt that i should help people like me who r seriously in trouble becoz of any issue in drupal.
i found a way around.
//comment the following line
//list($protocol, $code, $status_message) = explode(' ', trim(array_shift($response)), 3);
//add these lines
$status_data=explode(' ', trim(array_shift($response)), 3);
if (!isset($status_data[2])) $status_data[2]='OK';
if (!isset($status_data[1])) $status_data[1]='Switching Protocols';
list($protocol, $code, $status_message) = $status_data;
//newly added lines end here
both of the errors will be disappeared.
Comment #11
drupalexphyd CreditAttribution: drupalexphyd commentedIn Which Above lines need to be add
Comment #12
ravi_admec CreditAttribution: ravi_admec commentedhi drupalexphpyd,
you can find these lines of code in common.inc file it is available in includes folder.
Comment #13
twistor CreditAttribution: twistor commented#205969: drupal_http_request() assumes presence of Reason-Phrase in response Status-Line