We are given the differential equation:
\[
x^2 \frac{d^2 \phi}{dx^2} + x \frac{d\phi}{dx} + x^2 \phi = 0, \quad x>0
\]
The solution is assumed to be of the form \( \phi(x) = x^r \sum_{n=0}^{\infty} a_n x^n \). We substitute this into the given equation to determine the value of \( r \).
Step 1: First derivative of \( \phi(x) \).
The first derivative of \( \phi(x) \) is:
\[
\frac{d\phi}{dx} = \frac{d}{dx} \left( x^r \sum_{n=0}^{\infty} a_n x^n \right) = r x^{r-1} \sum_{n=0}^{\infty} a_n x^n + x^r \sum_{n=0}^{\infty} n a_n x^{n-1}
\]
\[
\frac{d\phi}{dx} = \sum_{n=0}^{\infty} a_n x^{r+n-1} + r \sum_{n=0}^{\infty} a_n x^{r+n-1}
\]
Step 2: Second derivative of \( \phi(x) \).
The second derivative of \( \phi(x) \) is:
\[
\frac{d^2\phi}{dx^2} = r(r-1) x^{r-2} \sum_{n=0}^{\infty} a_n x^n + 2r x^{r-1} \sum_{n=0}^{\infty} n a_n x^{n-1}
\]
\[
\frac{d^2\phi}{dx^2} = \sum_{n=0}^{\infty} a_n x^{r+n-2} + r \sum_{n=0}^{\infty} n a_n x^{r+n-2}
\]
Step 3: Substituting into the differential equation.
Substitute \( \frac{d^2 \phi}{dx^2} \) and \( \frac{d \phi}{dx} \) into the differential equation:
\[
x^2 \frac{d^2 \phi}{dx^2} + x \frac{d \phi}{dx} + x^2 \phi = 0
\]
After simplifying, we arrive at the characteristic equation:
\[
r^2 + 1 = 0
\]
\[
r^2 = -1
\]
Thus, \( r^2 + 1 = 0 \), and the value of \( r^2 + 1 \) is \( \boxed{0} \).