downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

設定ファイルの移行> <下位互換性のない変更点
Last updated: Fri, 06 Nov 2009

view this page in

CLI と CGI

PHP 5 では、CLI および CGI のファイル名にいくつかの変更があります。 PHP 5 では、CGI版は php-cgi.exe に変更されました。 (以前は php.exe) CLI版はメインディレクトリに 置かれるようになりました。(以前は、cli/php.exe))

PHP 5では、新しいモード php-win.exe が追加されました。 これは、CLI版と同じですが、php-win は出力を行わず、コンソールを提供しない ところが異なります。("DOS窓"は現れません。) この動作は、php-gtk に似ています。

PHP 5では、CLI版は常にグローバル変数$argv と $argcを設定します。



add a note add a note User Contributed Notes
CLI と CGI
shoebappa at gmail dot com
12-Mar-2008 08:41
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.)"

 
show source | credits | sitemap | contact | advertising | mirror sites