Photons don't have mass and I don't think Woody Allen ever said they did.

Then how do they have momentum?

How do photons have momentum? Because every moving thing has momentum. The only explanation I know is mathematical.

In general E²=p²c²+m²c⁴. For stationary particles this reduces to the famous E=mc². (Objects at rest have energy.) For massless particles it reduces to E=pc. Since E=hf and f=c/λ, then p=h/λ. (Photons have momentum.)

An object's momentum is its mass times its velocity, in Newtonian physics (where mass just means rest mass). In relativistic physics, simply replace the formula with relativistic mass times velocity. We can verify that photons have momentum by observing that they can transfer momentum to other objects. Divide the measured momentum by the velocity and you get its (relativistic) mass.

If you insist on being a Newtonian after such an experiment, then you either need to assume that photons have a non-zero rest mass, or that they travel at infinite speed. But either way doesn't spare you from other conflicts between reality and Newtonian physics.

In the early days of relativity, the terms "longitudinal mass" and "transverse mass" were used when it was thought that Newton's 2nd law should be expressed using the equation F=ma. Later on the consensus was that F=dp/dt is more fundamentally correct and that p=γmv is the (for lack of a better word) right way to define momentum. No one uses the terms longitudinal and transverse in regards to mass anymore, but sometime around 1920 the term "relativistic mass" popped up. This came from textbook authors (among them Wolfgang Pauli) who assumed that p=γmv should be read as p=(γm)v implying that mass is "relativistic" (m'=γm) in the same way that time and distance are — as in time dilation (t'=γt) and length contraction (l'=l/γ). Other than his initial use of the terms longitudinal mass and transverse mass, Einstein never referred to relativistic mass in any public writing. (He did write a letter to a colleague saying that such a concept has no clear definition, however.)

Relativistic mass and rest mass are not useful concepts since mass is Lorentz invariant. Mass is just mass. Energy, on the other hand, is affected by relative motion, which is why relativistic energy (E=γmc²) and rest energy (E₀=mc²) are still valid as is mass-energy conversion (∆E=∆mc²). Objects don't gain mass as their speed increases, nor do photons have mass. In every correct sense of the word mass, photons are massless.