infinite loop on page with comments after changing comments.php and header.php

The article you’re using is quite old, from ~2009. There are much better cleaner ways of doing commenting.

As a guide, follow this:

http://ottopress.com/2008/wordpress-2-7-comments-enhancements/

This is the definitive guide to implementing Comments post v2.7, and Otto is widely respected in the community.

Firstly, your comments code uses have_posts() to check if there are comments, instead use have_comments(), you’re also building the comment form from scratch.

Instead I recommend you use this as your base for comments.php:

http://core.trac.wordpress.org/browser/tags/3.3.1/wp-content/themes/twentyten/comments.php

It’s a good guide of how to do comments correctly with Modern WordPress. e.g. in that code the comment form is a 1 liner:

<?php comment_form(); ?>

A final word, when you include your footer, use get_footer();, and if you’re ever including a PHP template, use get_template_part() instead of the include or require directives