p != p' are two points on a 3+1 dimensional Lorentzian manifold (M, g), modelling our spacetime.
There is a minimizing geodesic from p to p', the "shortest straight-line path".
In a Lorentzian spacetime, geodesics are classified into three groups: spacelike, null, and timelike. A null geodesic describes the freefall of the massless relativistic wave equation, which applies to e.g. photons (as the Maxwell equations using the Lorenz gauge); and a timelike geodesic describes the massive relativistic wave equation, which applies to e.g. neutrinos (as the Dirac equation) or the Higgs boson (as the Klein-Gordon equation). In a particle paradigm, photons move at c freely falling on null geodesics; neutrinos, electrons and so forth move at less than c freely falling (experiencing no accelerating force) on timelike geodesics.
If p and p' are timelike-separated, they can be connected by a timelike geodesic (e.g., a path that could be taken by a massive particle), then we can calculate a nonzero spacetime interval S in some coordinate basis, and divide by c, giving us the proper time \tau such that d\tau = dS / c in a patch of flat spacetime (the metric g enters into the definition through general curved spacetime: on path P, \Delta \tau = \int_{P} 1/c \sqrt{g_{\mu\nu} dx^\mu dx^\nu (= \int_{P} d\tau), which is invariant under changes in coordinates, and has the same problem with dividing by c.
However, if spacetime points p and p'are lightlike-separated, they cannot be connected by a timelike geodesic, but rather by a null one. The spacetime interval of a lightlike geodesic is defined such that dS = 0 (thus the name "null").
Any path through spacetime can be parametrized by applying arbitrary labels to its points. A geodesic is a species of path. We can label any geodesic from A to B any way we like: Apple Zebra Xray 3.1415 1 86 Xray-again Manitoba Xray Xray-again ... 911. Arbitrary labellings are not widely useful, though, so we will probably want to label every point with a unique value in such a way that there is a total ordering from A to B, and even more ideally so that there is some smooth monotonically non-decreasing function f on the geodesic, mapping all its points to unique values of the parameter.
Proper time is just such a useful function on a timelike geodesic. It is not the only such function.
On a null geodesic, proper time would give us a labelling 0 0 0 0 0 ... 0, which is obviously not useful, as the 0s aren't unique or ordered. However, we can use any monotonic function, setting out labels at every point along the path from p to p' where we would (if we measured) detect the photon.
A good choice for a null geodesic is the affine parameter, as that preserves the photon's tangent vector under parallel transport along the path. There is a unique affine parametrization satisfying the geodesic equation for every geodesic, including every null geodesic.
One of the properties of the affine parameter on a null geodesic is that we can define a momentum k^{\mu} = \dot{X}^{\mu}, the dot representing the derivative with respect to the affine parameter -- the momentum k can be calculated at every point on the null geodesic, and in a curved spacetime k will differ from point to point. This difference in momentum is exactly the gravitational redshift.
So, it might be better to say: proper time is an unsuitable parameter for a photon in free fall, or for labelling points on its path from point A to point B. Instead we can use affine time (== the affine parameter) for a photon and for its path from point A to point B, and see that there is some definite timelike parameter for a photon on its journey that can [a] show where in spacetime it can be found during that journey and [b] what its momentum is at [a] and thus what its frequency, wavelength or energy is at [a] via the E = h{\nu} = \frac{hc}{\lambda} relation, and how those quantities change along the path in the presence of spacetime curvature.
I would not say "no time passes for it", because we can always define such a time. Affine time is one such (useful) definition, but we can use any others we like. Although a proper time can be calculated for such a massless particle, the proper time is 0 everywhere, so not very useful. However that does not strictly speaking mean that there is no passage of time from the point of view of the photon. It just needs to "wear a different sort of wristwatch" than an electron might choose to. However there is an affine parameterization for an electron moving between points I and J, so electrons (and neutrinos and other non-massless waves, particles, or objects) can always "wear the same sort of wristwatch" as a photon. (Some mathematical details in Wald's graduate-level textbook _General Relativity_ §3.3 and see ch. 3, problem 5).