i guess you need a compiler to compile php (or anything else) Install gcc in your system. What distro do you have? (what distro that does not install gcc by default?, maybe mandrake)
Try finding a rpm package of php (if you have red hat or mdk) or deb packages y you use debian. It will make life easier to you.
edit: if you use debian you can of course apt-get install it (do a apt-cache search php|more to see all php packets available and install what you want)