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, se efectuaron algunos cambios en el entorno CLI y los nombres de archivo CGI. En PHP 5, la versión CGI fue renombrada a php-cgi.exe (previamente php.exe) y la versión CLI ahora existe en el directorio principal (previamente era cli/php.exe).
En PHP 5 se introdujo también un nuevo modo: php-win.exe. Este es igual a la versión CLI, excepto que php-win no genera ninguna salida y por lo tanto no provee una consola (no aparece una "caja de dos" en la pantalla"). Este comportamiento es similar a php-gtk.
En PHP 5, la versión CLI siempre define las variables globales $argv y $argc, independientemente a cualquier directiva en php.ini. Incluso teniendo el parámetro register_argc_argv como off no tendrá efecto en la versión CLI.
Vea también la referencia de la línea de comandos.
CLI y CGI
12-Mar-2008 08:41
