today i wanted to run a php file as executable but before i can do that i need to know if have my apache web server is installed as an apache or cgi module. so to find out its easy. this is what i had to do:
first create a phpinfo.php file [
how to create phpinfo.php file ]
now look for where it says: server api
here is my example, on the image above you can see mine apacher server was installed a an apache module. if it says cgi, you have php compiled as cgi, if it reads apache, you have it running as an apache module.