A lot of times php files cannot be interpretted from the cgi-bin directory, try putting it into a regular document directory. Also try using the extention .php instead of .php4 unless you're sure that the webserver is set up to pass that extention to the php module.