The most simple way to solve this problem is as follows:
1. Turn off Apache server
2. Go to c:\xampp\php\
3. Rename php.ini to php.ini.bak
4. Rename php.ini-production to php.ini
5. Turn on the server again.
It has a flaw that it reverts everything to production mode. but you can always undo this.