From: Stig Bakken Date: Tue, 28 Sep 1999 12:08:34 +0000 (+0000) Subject: Started working on the Zeus support. Zeus's ISAPI obviously differs from X-Git-Tag: php-4.0b3_RC2~411 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c4c8555eb5677d3ea01407d2057f0038deb5376;p=php Started working on the Zeus support. Zeus's ISAPI obviously differs from Windows's, does someone have docs for the Windows API? --- diff --git a/INSTALL b/INSTALL index 3ad1f25a95..5311acab3c 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,8 @@ Installation Instructions for PHP 4.0 ------------------------------------- +Note! As of 4.0b3, PHP will require GNU make. + For the impatient here is a quick set of steps that will build PHP as an Apache module for Apache 1.3.x with MySQL support. A more verbose explanation follows. diff --git a/acconfig.h.in b/acconfig.h.in index 6c5744f358..c76094f1cf 100644 --- a/acconfig.h.in +++ b/acconfig.h.in @@ -118,3 +118,7 @@ /* Define to compile PHP/Zend thread safe */ #undef ZTS + +/* Define when compiling with Zeus support */ +#undef WITH_ZEUS + diff --git a/sapi/isapi/config.m4 b/sapi/isapi/config.m4 index 777ec8de65..93d06d7d13 100644 --- a/sapi/isapi/config.m4 +++ b/sapi/isapi/config.m4 @@ -5,7 +5,6 @@ AC_ARG_WITH(zeus, [ --with-zeus=DIR Build PHP as an ISAPI module for use with Zeus.], [ if test "$withval" != "no"; then - SAPI_TARGET=libphp4_isapi.so AC_MSG_RESULT(yes) if test "${enable_thread_safety}" != "yes"; then AC_MSG_ERROR(You must specify --enable-thread-safety to build as an ISAPI module) @@ -16,6 +15,7 @@ AC_ARG_WITH(zeus, if ! test -f "$zeuspath/web/include/httpext.h"; then AC_MSG_ERROR(Unable to find httpext.h in $zeuspath/web/include) fi + AC_DEFINE(WITH_ZEUS) AC_ADD_INCLUDE($zeuspath/web/include) PHP_SAPI=isapi SAPI_TARGET=php4isapi.so diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index ee3f1f2179..ce206b5efc 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -1,4 +1,25 @@ -#include +/* + +----------------------------------------------------------------------+ + | PHP version 4.0 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997, 1998, 1999 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.0 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_0.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: | + | | + +----------------------------------------------------------------------+ + */ + +#if WIN32|WINNT +# include +#endif #include #include #include @@ -8,6 +29,8 @@ #include "php_globals.h" #include "ext/standard/info.h" +#include "zeus.h" + #define MAX_STATUS_LENGTH sizeof("xxxx LONGEST STATUS DESCRIPTION") #define ISAPI_SERVER_VAR_BUF_SIZE 1024 #define ISAPI_POST_DATA_BUF 1024 @@ -190,7 +213,9 @@ static int sapi_isapi_send_headers(sapi_headers_struct *sapi_headers SLS_DC) header_info.pszStatus = status_buf; break; } +#ifndef WITH_ZEUS header_info.cchStatus = strlen(header_info.pszStatus); +#endif header_info.pszHeader = combined_headers; header_info.cchHeader = total_length; lpECB->dwHttpStatusCode = SG(sapi_headers).http_response_code; @@ -461,4 +486,11 @@ __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, L break; } return TRUE; -} \ No newline at end of file +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */