diff options
Diffstat (limited to 'sapi/litespeed/lsapi_main.c')
-rw-r--r-- | sapi/litespeed/lsapi_main.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index f5f7d39b44..b0ea105a88 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -173,6 +173,7 @@ static int sapi_lsapi_deactivate(void) if ( SG(request_info).path_translated ) { efree( SG(request_info).path_translated ); + SG(request_info).path_translated = NULL; } return SUCCESS; @@ -417,7 +418,7 @@ static void sapi_lsapi_log_message(char *message) static sapi_module_struct lsapi_sapi_module = { "litespeed", - "LiteSpeed V6.8", + "LiteSpeed V6.9", php_lsapi_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ @@ -601,11 +602,12 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va else { #if PHP_MAJOR_VERSION >= 7 - psKey = zend_string_init(pKey, keyLen, 1); + --keyLen; + psKey = zend_string_init(pKey, keyLen, 1); zend_alter_ini_entry_chars(psKey, (char *)pValue, valLen, type, PHP_INI_STAGE_ACTIVATE); - zend_string_release(psKey); + zend_string_release(psKey); #else zend_alter_ini_entry((char *)pKey, keyLen, (char *)pValue, valLen, @@ -769,6 +771,8 @@ static int cli_main( int argc, char * argv[] ) zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */ CG(in_compilation) = 0; /* not initialized but needed for several options */ + SG(options) |= SAPI_OPTION_NO_CHDIR; + #if PHP_MAJOR_VERSION < 7 EG(uninitialized_zval_ptr) = NULL; #endif @@ -807,9 +811,9 @@ static int cli_main( int argc, char * argv[] ) case 'v': if (php_request_startup() != FAILURE) { #if ZEND_DEBUG - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); + php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #else - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); + php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); #endif #ifdef PHP_OUTPUT_NEWAPI php_output_end_all(); @@ -1005,6 +1009,10 @@ int main( int argc, char * argv[] ) tsrm_startup(1, 1, 0, NULL); #endif +#ifdef ZEND_SIGNALS + zend_signal_startup(); +#endif + if (argc > 1 ) { if ( parse_opt( argc, argv, &climode, &php_ini_path, &php_bind ) == -1 ) { @@ -1163,11 +1171,7 @@ zend_module_entry litespeed_module_entry = { static int add_associate_array( const char * pKey, int keyLen, const char * pValue, int valLen, void * arg ) { - add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue -#if PHP_MAJOR_VERSION < 7 - , 1 -#endif - ); + add_assoc_string_ex((zval *)arg, (char *)pKey, keyLen, (char *)pValue); return 1; } @@ -1221,11 +1225,7 @@ PHP_FUNCTION(litespeed_response_headers) headerBuf[len] = 0; if ( len ) { while( isspace(*++p)); - add_assoc_string_ex(return_value, headerBuf, len+1, p -#if PHP_MAJOR_VERSION < 7 - , 1 -#endif - ); + add_assoc_string_ex(return_value, headerBuf, len, p); } } } @@ -1242,7 +1242,7 @@ PHP_FUNCTION(apache_get_modules) { static const char * mod_names[] = { - "mod_rewrite", "mod_mime", "mod_headers", "mod_expires", NULL + "mod_rewrite", "mod_mime", "mod_headers", "mod_expires", "mod_auth_basic", NULL }; const char **name = mod_names; /* TODO: */ |