This may be obvious, but if you are installing PHP under a home directory, don't enter '--prefix=~/place'. Use the full form '--prefix=/home/fred/place'.
Otherwise, it will half work and cause problems (because the shell char gets expanded in some places and not others).