The problem is entirely one of semantics. A photon does have relativistic mass. Solve the above equation for m and you get the relativistic mass of a photon of energy E. Relativistic mass, like energy, is a conserved quantity, the total amount in the universe is a constant, albeit unknown, quantity. Anything with a total energy, E, has a (relativistic) mass m = E / {c^2}.
Because of E = mc^2, relativistic mass is regarded as being the same quantity as energy where c^2 is just a conversion constant between two sets of units. For this reason, many consider "relativistic mass" redundant with total energy, and banish the term from discussion. Seems extreme to me, but it is the current fashion.
So in what sense does a photon have no mass?
Because there is a second definition of mass, called "rest mass". Relativistic mass varies with energy according to E = mc^2. That means the energy of motion, or kinictic energy K, of a moving object has its mass increase by K / {c^2}. Because c^2 is such a large number, the mass increase at a speed that is not an appreciable fraction of light speed is too small to measure. Still, since all fundamental particles of the same type have the exact same mass only when at rest, "rest mass" is an extremely important quantity to know.
It so happens that if we apply this calculation to a photon, we find a rest mass of 0, which has no meaning in the ordinary sense of the word. This is because, the phrase "Rest mass of a photon" is an oxymoron: there is absolutely no frame of reference in which a photon can be at rest. So folks omit the embarrassing qualifier, "rest", and just use the word, mass.
As a result, explaining this to newcomers without using the terms "relativistic mass" and "rest mass" becomes too convoluted to contemplate. But some attempt to do so. When that happens, remember this posting.