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 et CGI
PHP 5 introduit des modifications dans les noms des fichiers CLI et CGI. Avec PHP 5, la version CGI s'appelle maintenant php-cgi.exe (auparavant php.exe) et la version CLI se trouve maintenant dans le répertoire principal de PHP (auparavant cli/php.exe).
Un nouveau mode a également été introduit avec PHP 5 : php-win.exe. Cette version est équivalente à la version CLI sauf qu'elle n'ouvre pas de fenêtre de console DOS au lancement. Ce comportement est similaire à celui de php-gtk.
Avec PHP 5, la version CLI renseignera toujours les variables globales $argc et $argv en accord avec toutes les directives du php.ini. Même si vous avez la directive register_argc_argv configurée à Off, cela n'aura pas d'effet sur la version CLI.
Voir aussi la documentation sur la ligne de commande.
CLI et CGI
12-Mar-2008 01:41
