I know that the mass of a photon is zero. However, others say no it is just the rest mass which is zero, the relativistic mass isn't, but I say that no it is also zero because the rest mass $m$ is related to the relativistic mass $M$ through the relation $M = \gamma m$ and if $m = 0$ then $M = 0$ accordingly.
But, they say, if for a photon the momentum is $p = mc$ and the energy is $E = mc^2$, you can obtain the right formula for the photon momentum, namely $p = E/c$. So even though I know I can't even use $E = mc^2$ and $p = mc$ for a photon, I don't understand why they give, if we assume that they are right, the right answer for the photon momentum $p = E/c$.