if (n-1) is divisible by φ(n) then there is no prime p such that p^2|m.
I suppose you meant to say .
Let's proceed by contradiction, suppose on the contrary that there were a prime such that . Clearly since and are coprime, however implies , and since we have that which is a contradiction.
Check this by using the formula , where the products runs over all primes dividing .