Everything works fine when I zoom with a double click, I can pan to the left, right, up and down which means that this problem has something to do with the 2 fingers gesture recognition.
How long have you had your iPhone 4S and were you able to pinch & zoom when you purchased it? If so, you can try rebooting your device and then try pinching & zooming preferably with a photo. If you're still unable to, you may consider backing up your device via iCloud AND via iTunes and reset your device as new, preferably via iTunes.
I've been using my iPhone for 5 months and I was able to pinch & zoom before, this problem occurred one week ago...
I still have 5.1.1 version because I have jailbreak and I'm afraid that if I reset my device as new I won't be able to restore everything that I had before...
It might and I just might all of a sudden be the JB. I am not saying for sure but were you able to Pinch and Zoom during the JB? If either way I would opt to go with the device of JustMe'D. Let us know the outcome. You can always JB again unless that was the problem.