When merging php into a server system that you don't have X, the GD graphics libraries, libpng, or libjpeg installed, you get some quircky problems. Even though USE is set in make.conf with -X -libgd -jpeg -png and everything else under the sun for graphics and graphis libraries, when you merge php it chokes on png/jpeg/gd/t1lib because it can't find the .so|a. This is simply fixed by going through the ebuild file and removing the --with-* line in the ./configure section. Apparently this ebuild does not go through the use variables and check whether or not you want it to use jpeg, png,X,t1lib,or gd. Perhaps this was intended, but I seriously doubt it. Much thanks, Sacha van der Spek
Sorry for waiting, i'll fix it soon. Had a lot to do this weekend.... Roman