Many web pages say that Euler's totient function $\phi(n)$ can be given as
$$\phi(n)=n \prod_{p|n} \biggl(1- \frac{1}{p} \biggr)$$
But $\phi(1)=1$, and no primes divide $1$. Surely this gives
$$\phi(1)=\prod_{p|1} \biggl(1- \frac{1}{p} \biggr)=0n=0$$
Is $\phi(1)$ a special case, or am I missing something?
There's no problem here.
$\phi(1)=1$ even according to the product definition;
there are no primes dividing $1$, so it's an empty product, which is $1$.