Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Appendices : Migrating from PHP 4 to PHP 5 : CLI and CGI

CLI and CGI

In PHP 5 there were some changes in CLI and CGI filenames. In PHP 5, the CGI version was renamed to php-cgi.exe (previously php.exe) and the CLI version now sits in the main directory (previously cli/php.exe).

In PHP 5 it was also introduced a new mode: php-win.exe. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk.

In PHP 5, the CLI version will always populate the global $argv and $argc variables regardless of any php.ini directive setting. Even having register_argc_argv set to off will have no affect in CLI.

See also the command line reference.

Change Language


Follow Navioo On Twitter
What has changed in PHP 5
Backward Incompatible Changes
CLI and CGI
Migrating Configuration Files
New Functions
New Directives
Databases
New Object Model
Error Reporting
eXTReMe Tracker