Won't run for me

PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 204
PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 261

Comments

tjholowaychuk’s picture

Status: Active » Postponed (maintainer needs more info)

I have yet to suppress the notice/warnings but it should still function correctly, try:

./dran -u http://yoursite.com/ -av

MrBT’s picture

Nope, same thing

]# ./dran.php -u http://example.com/ -av
PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 204
PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 261

tjholowaychuk’s picture

Status: Postponed (maintainer needs more info) » Active

Hmm, the notice should be irrelevant, but if nothing else is outputting at all then that is defiantly no good. I will take a look

tjholowaychuk’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure what to think about that, I do get the same notices as you, but the rest works perfectly. I have added a new release with a few updates to the reports, but perhaps there was a typo in the last release. If the -h option displays the help properly, and then none of the other options work correctly then I will be pretty stumped!

MrBT’s picture

Bad news, same thing

./dran.php -u http://example.com/ -av
PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 204
PHP Notice: Undefined index: HTTP_HOST in /home/drupal/includes/bootstrap.inc on line 261

Not sure what else to tell you. Could bootstrap be looking for the php var that's not there?

tjholowaychuk’s picture

Status: Postponed (maintainer needs more info) » Postponed

Damn.. due to the bootstrap being invoked via CLI like you mention some of the super globals are not available (Even more notices output when I exec DRAN). Either way it should still function, so I am really stumped right now haha, well I will try and look into it, that is to bad though its a helpful tool! I have only put 3 or so hours into it and I already love it.

MrBT’s picture

I don't know much about php via the command line, but maybe there's a way to pass that variable in?

tjholowaychuk’s picture

I dont think those notices are the problem, like I mentioned I get even more notices, 4 or 5, but then again they are just notices which are "not important", DRAN uses the database access and a few functions thats about it, must be something else that I am missing. I will test this on one of our other servers and see how it goes

tjholowaychuk’s picture

Yikes well it works fine on one of our other servers with a varied config/os.

As I mentioned I do get several notices as well:

PHP Notice: Undefined index: HTTP_HOST in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 204
PHP Notice: Undefined index: HTTP_HOST in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 261
PHP Notice: Undefined index: REMOTE_ADDR in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 889
PHP Notice: Undefined index: REMOTE_ADDR in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 830
PHP Notice: Undefined index: REQUEST_METHOD in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 466
PHP Notice: Undefined property: stdClass::$theme in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/theme.inc on line 45
PHP Notice: Undefined index: REMOTE_ADDR in /home/httpd/vhosts/landmarkhomes.ca/httpdocs/includes/bootstrap.inc on line 717

tjholowaychuk’s picture

Actually wait, what version of PHP are you running? im not sure if member access was available in PHP 4.x that may be the reason nothing is showing up

tjholowaychuk’s picture

Status: Postponed » Closed (won't fix)

Until further notice I am going to assume this is just a PHP 5.x compatibility issue class member visibility, but I may back-port to PHP 4.x when I have time.

gpk’s picture

The HTTP_HOST aspect is fixed for core 5.x and 6.x in #346285: Drupal 5.14 & Drupal 6.8 will not load on clients that do not transmit HTTP_HOST. Haven't REMOTE_ADDR and REQUEST_METHOD are also fixed elsewhere,... they may be ...