I had XAMPP 1.6.4 with PHP 5.2.4 on my Vista machine. Every time I ran PHP in command line (CLI) it crashed miserably, though after completing the task at hand. I thought Vista’s User Access Control (UAC) was the culprit, but turning it off did zilch to fix the problem.
Turned out the real fix is with PHP 5.2.5, or at least with its newer copy of mysqli_php.dll. I downloaded PHP 5.2.5 following the instructions, and PHP CLI crashes no more.