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 a CGI
V PHP 5 boli urobené nejaké zmeny v názvoch súborov CLI a CGI. V PHP 5 bola CGI verzia premenovaná na php-cgi.exe (pred tým php.exe) a CLI verzia je teraz v hlavnom adresári (pred tým cli/php.exe).
V PHP 5 bol tiež predstavený nový mód: php-win.exe. Tento je zhodný s CLI verziou, až na to, že php-win neposiela na výstup nič, a teda poskytuje žiadnu konzolu (žiadne "dosovské okno" sa obrazovke neobjaví). Toto správanie je podobné k php-gtk.
V PHP 5 bude CLI verzia vždy obývať globálne premenné $argv a $argc.
CLI a CGI
shoebappa at gmail dot com
12-Mar-2008 01:41
12-Mar-2008 01:41
