I pulled my hair out for 10 hours trying to figure out why my CGI Wrappers would spit out the shell script and not run the code.
From: http://ubuntuforums.org/showthread.php?t=341164&highlight=apache+php
"PHP4 needs a specific configuration so that it won't try to execute the starter script.
Edit /etc/php4/cgi/php.ini, search for cgi.fix_pathinfo and set it to 1.
If you don't do this, PHP5 will work fine (it has cgi.fix_pathinfo compiled right in), but PHP4 will simply output the starter script. (You can even put <?php phpinfo (); ?> inside the starter script and will see the PHP information.)"
CLI y CGI
En PHP 5 hubo algunos cambios en los nombres de ficheros CLI y CGI. En PHP 5, se renombró la versión CGI a php-cgi.exe (anteriormente php.exe) y ahora la versión CLI se encuentra en el directorio principal (anteriormente cli/php.exe).
En PHP 5 también se introdujo un nuevo modo: php-win.exe. Es igual que la versión CLI, excepto que php-win no muestra ninguna salida, y por tanto no lanza una consola (no lanza una ventana "dos"). Es un comportamiento similar al de php-gtk.
En PHP 5, la versión CLI siempre crea las variables globales $argv y $argc independientemente de cualquier directiva en php.ini. Incluso si se tuviera register_argc_argv en off, no afectaría a CLI.
Revise también el manual de referencia en línea de comandos.
