The rest mass of a photon is zero.
Summary
Let the speed of the photon be $c = 299,792,458 \mathrm{m/s}$. Then the rest mass of the photon is $0$.
Proof
1. Relationship between relativistic energy, momentum, and speed
$$p=\gamma m_{0} v$$ $$E=\gamma m_{0} c^2$$ $$\implies \gamma m_{0}=\dfrac{E}{c^2}$$
By solving these equations simultaneously, $$p=\dfrac{E}{c^2}v$$ $$\implies v=\dfrac{pc^2}{E}$$
2. Relativistic relationship between energy and momentum of a particle
$$E=\sqrt{{m_{0}}^2c^4+p^2c^2}$$
3. By 1 and 2
$$v=\frac{pc^2}{\sqrt{{m_{0}}^2c^4+p^2c^2}}$$ At this point, since the speed of the photon is $c$, substituting into $v=c$ gives $$\frac{pc}{\sqrt{{m_{0}}^2c^4+p^2c^2}}=1$$ $$pc=\sqrt{{m_{0}}^2c^4+p^2c^2}$$ $$\implies p^2c^2={m_{0}}^2c^4+p^2c^2$$ At that point, the equation holds if either $c=0$ or $m_{0}=0$, but since $c\neq 0$, $m_{0}=0$
■