If you are running the <i>mod_php</i> version of PHP and you want to store your PHP source alongside the other server-side scripting languages in Apache's 'cgi-bin' directory (or the location for your own script repository), you need to realise that it is usually setup with the Apache 'ScriptAlias' directive : PHP needs to be forwarded to the httpd process and most scripts do not. IF you have access to your web server config, edit your httpd.conf to read something like this :
Alias /cgi-bin "/intranet/admin/cgi-bin"
Options FollowSymLinks ExecCGI
Allow from all
The above is from the config for one our virtual servers, but the principles are the same : change 'ScriptAlias' to 'Alias' for cgi-bin, then instruct Apache to <i>ExecCGI</i> in that directory. To ensure that Apache knows about non-Perl CGI, add these to the top of the file: