There are lots of myths and urban legends regarding logging of time. However most are wrong according to the JARs.
According to the JARs, only one pilot can log P1 at a time in a Single Pilot Aircraft. It's simple:
Single Pilot = One person in command = One person logging P1.
The only exception to this is succesful tests with a Flight Examiner, where the Examiner logs P1, the candidate P1/S.
As StrateandLevel points out, P2 can only be logged in aircraft that require two crew members.