cvs: /php4/sapi/isapi PWS-php4.reg /php4/tests run.html run.php /php4 NEWS /php4/ext/standard info.c info.h /php4/sapi/isapi php4isapi.c

From: Date: Fri, 18 Feb 2000 18:00:15 +0000
Subject: cvs: /php4/sapi/isapi PWS-php4.reg /php4/tests run.html run.php /php4 NEWS /php4/ext/standard info.c info.h /php4/sapi/isapi php4isapi.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10458@lists.php.net to get a copy of this message
zeev Fri Feb 18 10:00:15 2000 EDT Added files: /php4/sapi/isapi PWS-php4.reg /php4/tests run.html run.php Modified files: /php4 NEWS /php4/ext/standard info.c info.h /php4/sapi/isapi php4isapi.c Log: - Fix some issues with the ISAPI module, made it friendlier to non Win32 platforms - Added .reg file for PWS setup - Reordered some stuff in phpinfo() Index: php4/NEWS diff -u php4/NEWS:1.135 php4/NEWS:1.136 --- php4/NEWS:1.135 Thu Feb 17 18:09:11 2000 +++ php4/NEWS Fri Feb 18 09:59:43 2000 @@ -2,6 +2,8 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? ????, Version 4.0 Beta 4 +- Made PHP work under Microsoft Personal Web Server, under both Windows NT + workstation and Windows 95 (Zeev) - Made multipart/form-data content obey to the variables_order directive (Zeev) - Updated the browscap module to work with PHP 4.0 (Zeev) - Recover gracefully in ISAPI after the client prematurely presses STOP (Andi) Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.62 php4/ext/standard/info.c:1.63 --- php4/ext/standard/info.c:1.62 Fri Feb 11 07:59:29 2000 +++ php4/ext/standard/info.c Fri Feb 18 09:59:44 2000 @@ -274,30 +274,49 @@ PUTS("<h1>PHP 4.0 Credits</h1>\n"); + if (flag & PHP_CREDITS_GROUP) { + /* Group */ + + PUTS("<table border=5 width=\"600\">\n"); + php_info_print_table_header(1, "PHP Group"); + php_info_print_table_row(1, "Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, \ + Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski"); + PUTS("</table>\n"); + } + if (flag & PHP_CREDITS_GENERAL) { /* Language */ + PUTS("<table border=5 width=\"600\">\n"); PUTS("<tr><th colspan=\"2\" bgcolor=\"" PHP_HEADER_COLOR "\">PHP 4.0 Authors</th></tr>\n"); php_info_print_table_header(2, "Contribution", "Authors"); - CREDIT_LINE("PHP Group", "Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, \ - Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski"); CREDIT_LINE("Zend Scripting Language Engine", "Andi Gutmans, Zeev Suraski"); CREDIT_LINE("Extension Module API", "Andi Gutmans, Zeev Suraski"); CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken, Sascha Schumann"); CREDIT_LINE("Win32 Port", "Shane Caraveo, Zeev Suraski"); CREDIT_LINE("Server API (SAPI) Abstraction Layer", "Andi Gutmans, Shane Caraveo, Zeev Suraski"); - CREDIT_LINE("Apache SAPI Module", "Rasmus Lerdorf, Zeev Suraski"); - CREDIT_LINE("ISAPI SAPI Module", "Andi Gutmans, Zeev Suraski"); - CREDIT_LINE("CGI SAPI Module", "Rasmus Lerdorf, Stig Bakken"); - CREDIT_LINE("AOLserver SAPI Module", "Sascha Schumann"); - CREDIT_LINE("Servlet SAPI Module", "Sam Ruby"); - CREDIT_LINE("Roxen SAPI Module", "David Hedbor"); - CREDIT_LINE("thttpd SAPI Module", "Sascha Schumann"); PUTS("</table>\n"); } + if (flag & PHP_CREDITS_GENERAL) { + /* SAPI Modules */ + + PUTS("<table border=5 width=\"600\">\n"); + PUTS("<tr><th colspan=\"2\" bgcolor=\"" PHP_HEADER_COLOR "\">SAPI Modules</th></tr>\n"); + php_info_print_table_header(2, "Contribution", "Authors"); + CREDIT_LINE("Apache", "Rasmus Lerdorf, Zeev Suraski"); + CREDIT_LINE("ISAPI", "Andi Gutmans, Zeev Suraski"); + CREDIT_LINE("CGI", "Rasmus Lerdorf, Stig Bakken"); + CREDIT_LINE("AOLserver", "Sascha Schumann"); + CREDIT_LINE("Java Servlet", "Sam Ruby"); + CREDIT_LINE("Roxen", "David Hedbor"); + CREDIT_LINE("thttpd", "Sascha Schumann"); + PUTS("</table>\n"); + } + if (flag & PHP_CREDITS_MODULES) { /* Modules */ + PUTS("<table border=5 width=\"600\">\n"); PUTS("<tr><th colspan=\"2\" bgcolor=\"" PHP_HEADER_COLOR "\">Module Authors</th></tr>\n"); php_info_print_table_header(2, "Module", "Authors"); @@ -410,6 +429,13 @@ REGISTER_LONG_CONSTANT("INFO_VARIABLES", PHP_INFO_VARIABLES, CONST_PERSISTENT|CONST_CS); REGISTER_LONG_CONSTANT("INFO_LICENSE", PHP_INFO_LICENSE, CONST_PERSISTENT|CONST_CS); REGISTER_LONG_CONSTANT("INFO_ALL", PHP_INFO_ALL, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_GROUP", PHP_CREDITS_GROUP, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_GENERAL", PHP_CREDITS_GENERAL, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_SAPI", PHP_CREDITS_SAPI, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_MODULES", PHP_CREDITS_MODULES, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_DOCS", PHP_CREDITS_DOCS, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_FULLPAGE", PHP_CREDITS_FULLPAGE, CONST_PERSISTENT|CONST_CS); + REGISTER_LONG_CONSTANT("CREDITS_ALL", PHP_CREDITS_ALL, CONST_PERSISTENT|CONST_CS); } Index: php4/ext/standard/info.h diff -u php4/ext/standard/info.h:1.8 php4/ext/standard/info.h:1.9 --- php4/ext/standard/info.h:1.8 Tue Dec 21 12:35:43 1999 +++ php4/ext/standard/info.h Fri Feb 18 09:59:44 2000 @@ -27,7 +27,7 @@ | Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: info.h,v 1.8 1999/12/21 20:35:43 zeev Exp $ */ +/* $Id: info.h,v 1.9 2000/02/18 17:59:44 zeev Exp $ */ #ifndef _INFO_H #define _INFO_H @@ -46,10 +46,12 @@ #define PHP_INFO_ALL 0xFFFFFFFF -#define PHP_CREDITS_GENERAL (1<<0) -#define PHP_CREDITS_MODULES (1<<1) -#define PHP_CREDITS_DOCS (1<<2) -#define PHP_CREDITS_FULLPAGE (1<<3) +#define PHP_CREDITS_GROUP (1<<0) +#define PHP_CREDITS_GENERAL (1<<1) +#define PHP_CREDITS_SAPI (1<<2) +#define PHP_CREDITS_MODULES (1<<3) +#define PHP_CREDITS_DOCS (1<<4) +#define PHP_CREDITS_FULLPAGE (1<<5) #define PHP_CREDITS_ALL 0xFFFFFFFF #define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42" Index: php4/sapi/isapi/php4isapi.c diff -u php4/sapi/isapi/php4isapi.c:1.27 php4/sapi/isapi/php4isapi.c:1.28 --- php4/sapi/isapi/php4isapi.c:1.27 Wed Feb 16 08:46:01 2000 +++ php4/sapi/isapi/php4isapi.c Fri Feb 18 09:59:44 2000 @@ -17,9 +17,14 @@ +----------------------------------------------------------------------+ */ -#if WIN32|WINNT +#ifdef PHP_WIN32 # include <windows.h> +# include <process.h> +#else +# define __try +# define __except(val) #endif + #include <httpext.h> #include <httpfilt.h> #include <httpext.h> @@ -29,6 +34,7 @@ #include "php_globals.h" #include "ext/standard/info.h" #include "php_variables.h" +#include "php_ini.h" #ifdef WITH_ZEUS #include "zeus.h" @@ -39,6 +45,7 @@ #define ISAPI_POST_DATA_BUF 1024 static zend_bool bFilterLoaded=0; +static zend_bool bTerminateThreadsOnError=0; static char *isapi_server_variables[] = { "ALL_HTTP", @@ -136,11 +143,10 @@ DWORD num_bytes = str_length; LPEXTENSION_CONTROL_BLOCK ecb; SLS_FETCH(); - ELS_FETCH(); ecb = (LPEXTENSION_CONTROL_BLOCK) SG(server_context); if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes, HSE_IO_SYNC ) == FALSE) { - longjmp(EG(bailout), 1); + zend_bailout(); } return num_bytes; } @@ -235,6 +241,7 @@ || zend_startup_module(&php_isapi_module)==FAILURE) { return FAILURE; } else { + bTerminateThreadsOnError = (zend_bool) INI_INT("isapi.terminate_threads_on_error"); return SUCCESS; } } @@ -486,6 +493,16 @@ } +static void my_endthread() +{ +#ifdef PHP_WIN32 + if (bTerminateThreadsOnError) { + _endthread(); + } +#endif +} + + DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB) { zend_file_handle file_handle; @@ -514,6 +531,7 @@ efree(SG(request_info).cookie_data); } } __except(EXCEPTION_EXECUTE_HANDLER) { +#ifdef PHP_WIN32 if (_exception_code()==EXCEPTION_STACK_OVERFLOW) { LPBYTE lpPage; static SYSTEM_INFO si; @@ -533,28 +551,30 @@ /* Free pages below current page */ if (!VirtualFree(mi.AllocationBase, (LPBYTE)lpPage - (LPBYTE) mi.AllocationBase, MEM_DECOMMIT)) { - ExitThread(0); + _endthread(); } /* Restore the guard page */ if (!VirtualProtect(lpPage, si.dwPageSize, PAGE_GUARD | PAGE_READWRITE, &dwOldProtect)) { - ExitThread(0); + _endthread(); } CG(unclean_shutdown)=1; php_isapi_report_exception("Stack overflow", sizeof("Stack overflow")-1 SLS_CC); } else if (_exception_code()==EXCEPTION_ACCESS_VIOLATION) { php_isapi_report_exception("Access violation", sizeof("Access violation")-1 SLS_CC); - ExitThread(0); + my_endthread(); } else { - ExitThread(0); + php_isapi_report_exception("Unknown fatal exception", sizeof("Unknown fatal exception")-1 SLS_CC); + my_endthread(); } +#endif } __try { php_request_shutdown(NULL); } __except(EXCEPTION_EXECUTE_HANDLER) { - ExitThread(0); + my_endthread(); } return HSE_STATUS_SUCCESS;

« previous php.version4 (#10458) next »