Oh my... another configuration/setup/compile issue.
Out of the box gentoo's default configuration for mod_php (Apache's method of using PHP as a module) does not support GD (the PHP graphics extensions).
This means you cannot use the PHP functions imagecreate() etc. PHP's GD interface is really very useful if you want to do any server side image manipulation.
You can tell if you're version of mod_php has GD support by putting the php command "phpinfo()" in a script and executing it through your webserver. If you see the following then you do not have GD support:
--without-gd
To enable the image* functions you will have to re-emerge mod_php using the correct "USE" line:
% USE="gd jpeg png gif apache2" emerge mod_php
or for tcsh
% setenv USE "gd jpeg png gif apache2" % emerge mod_php