No, typical php installs would go under /usr/local/php-5.1.2 or something similar that all users can access. As far as i know, /root is only accessible as root and as such, Apache would have to run as root which is a BAD idea.
When you compile php, use the --prefix switch to tell it where to install to. A typical configure is like:
$ ./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local
That of course is followed by all your --with-gd and other libraries.