The definition of the proper time interval, for a particle with an arbitrary motion $ \vec{v} $ in a reference frame $ R $ between times $ t_1 $ and $ t_2 $ in this reference frame, is:
$$ \Delta\tau=\tau_2-\tau_1=\int_{t_1}^{t_2}d\tau=\int_{t_1}^{t_2}\sqrt{1-\frac{\vec{v(t)}^2}{c^2}}dt $$
So, if the particle is a photon, $ \vec{v(t)}^2=c^2 $ which leads to $ d\tau=0 $ and $\Delta\tau=0 $: the proper time that elapses between any two events on the world line of a photon is zero.
An other demonstration:
if $ ds $ is the elementary interval of length, the elementary interval of proper time $ d\tau $ can be defined as
$$ d\tau=\frac{ds}{c}\ \ \ \ [1] $$
Considering the elementary interval of length squared as
$ ds^2=c^2dt^2-dx^2-dy^2-dz^2=c^2dt^2-\vec{dr}^2 $,
for a photon you have $ |\frac{dr}{dt}|=c $, which leads to $ ds^2=0 $, and then with $ [1] \Rightarrow d\tau=0 $.
Hoping to have answered your question,
Best regards.