I have recently been through a lot of pain trying to configure a local installation of WordPress using xampp. The problem was that after activating a theme (not the default one) I was getting an error:
Parse error: syntax error, unexpected T_ENDWHILE in (...........)
This was driving me crazy but after a lot of searching I FINALLY found the solution! I'm so happy that I want to share it with the world because I really only found this valuable piece of information in one page (and I did a lot of searching, believe me).
When installing a local copy for use in a development environment one of the main problems to tackle is making sure that your local server is as close as possible to your production environment. There are many variables that can change like software versions and configuration parameters. For this specific case it's one simple parameter in the php.ini file that was causing issues.
Long story short, apparently the php.ini file included in xampp has the option:
short_open_tag = Off
by default. By simply changing this to:
short_open_tag = On
all my problems were magically resolved!
I hope you find this useful.