CVS update: php31/sapi

From: Date: Fri, 21 Aug 1998 00:30:45 +0000
Subject: CVS update: php31/sapi
Groups: php.dev 
Request: Send a blank email to php-dev+get-379@lists.php.net to get a copy of this message
Date: Thursday August 20, 1998 @ 20:30 Author: shane Update of /repository/php31/sapi In directory asf:/tmp/cvs-serv18374/sapi Modified Files: cgi_sapi.c Log Message: Ok, cgi works on iis and apache NT. SCRIPT_FILENAME is a bad thing on NT, at least until apache group fixes it. Index: php31/sapi/cgi_sapi.c diff -c php31/sapi/cgi_sapi.c:2.9 php31/sapi/cgi_sapi.c:2.10 *** php31/sapi/cgi_sapi.c:2.9 Thu Aug 20 19:06:41 1998 --- php31/sapi/cgi_sapi.c Thu Aug 20 20:30:44 1998 *************** *** 105,114 **** } ! int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len) ! { ! if (fwrite(string, len, 1, stdout) < (unsigned int) len) { ! sapi_info->abort = 1; #if MSVC5 OutputDebugString("write client (fwrite) failed\n"); #endif --- 105,112 ---- } ! int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len){ ! if(fwrite(string,len,1,stdout)<(unsigned int)1){ #if MSVC5 OutputDebugString("write client (fwrite) failed\n"); #endif *************** *** 264,281 **** --- 262,297 ---- sapi_info->debug_log = sapi_debug_log; #endif + #if !(WIN32|WINNT) + /* APACHE PROBLEM. SCRIPT_FILENAME is not correctly set on apache NT*/ /* Hack for annoying servers that do not set SCRIPT_FILENAME for us (like anything other than apache? :) */ if (!sapi_info->script_filename) { sapi_info->script_filename = getenv("SCRIPT_FILENAME"); } + #endif + #if MSVC5 + OutputDebugString("SCRIPT_FILENAME: "); + OutputDebugString(sapi_info->script_filename); + OutputDebugString("\n"); + #endif if (!sapi_info->script_filename) { if (sapi_info->argv0) { sapi_info->script_filename = sapi_info->argv0; + #if MSVC5 + OutputDebugString("argv0: "); + OutputDebugString(sapi_info->argv0); + OutputDebugString("\n"); + #endif } else if (sapi_info->path_translated) { /*for broken servers that don't set argv correctly, not the best thing, but works */ sapi_info->script_filename = strdup(sapi_info->path_translated); + #if MSVC5 + OutputDebugString("path_translated: "); + OutputDebugString(sapi_info->path_translated); + OutputDebugString("\n"); + #endif } else { /*hmm, no file specified, we could just exit with error now */ sapi_info->script_filename = NULL; *************** *** 286,291 **** --- 302,312 ---- } else { sapi_info->rqst_filename = NULL; } + #if MSVC5 + OutputDebugString("Filename: "); + OutputDebugString(sapi_info->rqst_filename); + OutputDebugString("\n"); + #endif } *************** *** 358,363 **** --- 379,385 ---- sapi_info->script_filename = NULL; sapi_info->filename = NULL; sapi_info->query_string = NULL; + sapi_info->argv0=NULL; /* Make sure we detect we are a cgi - a bit redundancy here, but the default case is that we have to check only the first one. */ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#379) next »