That's not the whole problem. It's not an error, it's a notice. Proper programming would demand that you declare the variable before you try to use it, by setting $str = "$_GET['str'] in this case.
The fact that "hello" was not echoed on to the screen is because register_globals = OFF (which is a good thing). The solution there is to use $_GET['str'] as was suggested. However, you will STILL get the Notice, because $str is never defined in the page. To prevent this, you need to disable notices.
Edit php.ini. Find the line that looks something like this:
error_reporting = E_ALL
Change it to this:
error_reporting = E_ALL & ~E_NOTICE
That will disable notices from that point forward.