When all else fails, I use The Scientific Method:
- comment out half the code
- see if I still get the bug
- if no then uncomment half the commented-out code and go to step 2
- if yes then comment out half the un-commented-out code and go to step 2
It’s fairly rare I need to do this in php, but currently hacking in vbscript which I don’t know at all …