summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2002-09-18 21:57:42 +0000
committerZeev Suraski <zeev@php.net>2002-09-18 21:57:42 +0000
commit76312b4508b43ed2cebd97b749e9e90181e55073 (patch)
treede244c23b518eff0488eb3a965b21e2522ee0454 /sapi/cli/php_cli.c
parent70f17979fb7ac0c7379a48bc86d26a009cfb56ed (diff)
downloadphp-git-76312b4508b43ed2cebd97b749e9e90181e55073.tar.gz
another startup initialization fix - only ISAPI and CGI SAPI's tested,
minor compile buglets might occur in other SAPIs, but should be trivial to fix...
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index cf7ef0725d..ddfa66163b 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -200,13 +200,23 @@ static void sapi_cli_send_header(sapi_header_struct *sapi_header, void *server_c
PHPWRITE_H("\r\n", 2);
}
+
+static int php_cli_startup(sapi_module_struct *sapi_module)
+{
+ if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
+ return FAILURE;
+ }
+ return SUCCESS;
+}
+
+
/* {{{ sapi_module_struct cli_sapi_module
*/
static sapi_module_struct cli_sapi_module = {
"cli", /* name */
"Command Line Interface", /* pretty name */
- php_module_startup, /* startup */
+ php_cli_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
NULL, /* activate */
@@ -421,7 +431,7 @@ int main(int argc, char *argv[])
cli_sapi_module.executable_location = argv[0];
/* startup after we get the above ini override se we get things right */
- if (php_module_startup(&cli_sapi_module)==FAILURE) {
+ if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) {
return FAILURE;
}