I fixed the problem. Actually absence of some necessary dll files, not sure which particular file, was the reason and I was trying in the absence of a lot of dll files.
What I did was, I had followed the apache configuration part from teammate 1 and then copied the php5 directory from teammate 2 (who was on a 32-bit system with Windows px). I assumed that the php 5 folder would be same and was wrong. The problem got fixed when I took the php 5 folder of teammate 1.
I checked and found there were many differences in the contents of the two php5 folders, mainly dll files. Absence of necessary dll files must have been the issue because I needed a system restart after taking the correct php5 folder of teammate 1.
Moral of the story -
While copying, don't apply brain and copy from the same place