From: Edin Kadribasic Date: Mon, 25 Mar 2002 17:02:30 +0000 (+0000) Subject: Hidden the existance of CLI SAPI by: X-Git-Tag: php-4.2.0RC2~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=910cb1be81e3c45f3463b7917baabf21914373cb;p=php Hidden the existance of CLI SAPI by: - removing the NEWS entry - removing cli from make install chain - marking it EXPERIMENTAL - reverting installed name of cgi from php-cgi to php Marged max_execution_time override from head. # I really hope that people who found cli to be "inconsistent" and # "unstable" will find time to help rectify those problems. --- diff --git a/NEWS b/NEWS index 6de568daad..a461f6db13 100644 --- a/NEWS +++ b/NEWS @@ -4,12 +4,6 @@ PHP 4 NEWS - ATTENTION!! register_globals defaults to 'off' now !!! - Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is enabled. (Jason) -- Added CLI (command line interface) sapi which is more suitable for writing - shell scripts. Some of the differences to CGI sapi are: no HTTP headers, - plain text error messages, does not change working directory, have a new -r - option which executes a piece of PHP code directly from the commmand line, etc. - "make install" will install CLI SAPI version of php in {PREFIX}/bin/php while - CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin) - Fixed HTTP file upload support to handle big files better. (Jani) - Major modifications to the Sockets Extension and its API (Jason): . Fixed numerous bugs. diff --git a/sapi/cgi/config.m4 b/sapi/cgi/config.m4 index 04519d404e..364f07e58b 100644 --- a/sapi/cgi/config.m4 +++ b/sapi/cgi/config.m4 @@ -64,7 +64,7 @@ if test "$PHP_SAPI" = "cgi"; then fi if test "$PHP_SAPI" = "cgi" ; then - INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(INSTALL_ROOT)\$(bindir)/php-cgi" + INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(INSTALL_ROOT)\$(bindir)/php" fi AC_MSG_CHECKING(for fhttpd module support) diff --git a/sapi/cli/EXPERIMENTAL b/sapi/cli/EXPERIMENTAL new file mode 100644 index 0000000000..462d301839 --- /dev/null +++ b/sapi/cli/EXPERIMENTAL @@ -0,0 +1,3 @@ +this module is experimental, +its feature set and behaviour can change. +you have been warned! diff --git a/sapi/cli/README b/sapi/cli/README index ed89e97006..040e224cb0 100644 --- a/sapi/cli/README +++ b/sapi/cli/README @@ -13,3 +13,6 @@ The main differences between the two: * Plain text error message * $argc and $argv registered irrespective of register_globals * implicit_flush always on +* -r option which allows execution of PHP code directly from + the command line (e.g. php -r 'echo md5("test");' ) +* max_execution_time is set to unlimited, overriding php.ini setting. diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 index 83aef7b2bb..96d67c3c52 100644 --- a/sapi/cli/config.m4 +++ b/sapi/cli/config.m4 @@ -16,9 +16,7 @@ AC_ARG_ENABLE(cli, [PHP_SAPI_CLI=yes] ) -if test "$PHP_SAPI_CLI" != "no"; then - INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 sapi/cli/php \$(INSTALL_ROOT)\$(bindir)/php" -else +if test "$PHP_SAPI_CLI" = "no"; then PHP_DISABLE_CLI fi diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index e51340a262..33b31f840f 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -396,6 +396,7 @@ int main(int argc, char *argv[]) SG(options) |= SAPI_OPTION_NO_CHDIR; zend_alter_ini_entry("html_errors", 12, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); zend_alter_ini_entry("implicit_flush", 15, "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry("max_execution_time", 19, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); while ((c = ap_php_getopt(argc, argv, OPTSTRING)) != -1) { switch (c) {