summaryrefslogtreecommitdiff
path: root/sapi/fastcgi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/fastcgi')
-rw-r--r--sapi/fastcgi/CREDITS4
-rw-r--r--sapi/fastcgi/Makefile.in5
-rw-r--r--sapi/fastcgi/README.FastCGI17
-rw-r--r--sapi/fastcgi/config.m426
-rw-r--r--sapi/fastcgi/fastcgi.c579
-rw-r--r--sapi/fastcgi/fastcgi.dsp195
-rw-r--r--sapi/fastcgi/php.sym0
-rw-r--r--sapi/fastcgi/php_fastcgi.h28
-rw-r--r--sapi/fastcgi/windows.txt35
9 files changed, 0 insertions, 889 deletions
diff --git a/sapi/fastcgi/CREDITS b/sapi/fastcgi/CREDITS
deleted file mode 100644
index eb9cece428..0000000000
--- a/sapi/fastcgi/CREDITS
+++ /dev/null
@@ -1,4 +0,0 @@
-fastcgi
-Ben Mansell
-Stephen Landamore
-Daniel Silverstone
diff --git a/sapi/fastcgi/Makefile.in b/sapi/fastcgi/Makefile.in
deleted file mode 100644
index 0bea9c31b1..0000000000
--- a/sapi/fastcgi/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-
-LTLIBRARY_NAME = libsapi.la
-LTLIBRARY_SOURCES = fastcgi.c
-
-include $(top_srcdir)/build/ltlib.mk
diff --git a/sapi/fastcgi/README.FastCGI b/sapi/fastcgi/README.FastCGI
deleted file mode 100644
index 65dbc44ea0..0000000000
--- a/sapi/fastcgi/README.FastCGI
+++ /dev/null
@@ -1,17 +0,0 @@
-FastCGI module
---------------
-
-This module requires the FastCGI development kit, available from
-http://www.fastcgi.com/
-
-Before building PHP, please enter the dev kit, and run:
-
-./configure
-make
-make export
-
-This will compile the library code required for the FastCGI module. All
-that is then required is to configure PHP with the '--with-fastcgi' option.
-After making the code, you will end up with a binary file called 'php'.
-Installation of this file will depend on the web server being used, please
-see their documentation for details.
diff --git a/sapi/fastcgi/config.m4 b/sapi/fastcgi/config.m4
deleted file mode 100644
index b01070587a..0000000000
--- a/sapi/fastcgi/config.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-dnl
-dnl $Id$
-dnl
-
-AC_MSG_CHECKING(for FastCGI support)
-AC_ARG_WITH(fastcgi,
-[ --with-fastcgi=SRCDIR Build PHP as FastCGI application],[
- if test "$withval" = "yes"; then
- FASTCGIPATH=/usr/local
- else
- FASTCGIPATH=$withval
- fi
- test -f "$FASTCGIPATH/lib/libfcgi.a" || AC_MSG_ERROR(Unable to find libfcgi.a in $FASTCGIPATH/lib)
- test -f "$FASTCGIPATH/include/fastcgi.h" || AC_MSG_ERROR(Unable to find fastcgi.h in $FASTCGIPATH/include)
- PHP_SAPI=fastcgi
- PHP_LIBS=$FASTCGIPATH/lib/libfcgi.a
- PHP_ADD_INCLUDE($FASTCGIPATH/include)
- EXT_PROGRAM_LDADD="$EXT_PROGRAM_LDADD $FASTCGIPATH/lib/libfcgi.a"
- INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(bindir)/$SAPI_FASTCGI"
- RESULT=yes
- PHP_SUBST(FASTCGI_LIBADD)
- PHP_SUBST(EXT_PROGRAM_LDADD)
-],[
- RESULT=no
-])
-AC_MSG_RESULT($RESULT)
diff --git a/sapi/fastcgi/fastcgi.c b/sapi/fastcgi/fastcgi.c
deleted file mode 100644
index d79f8f1130..0000000000
--- a/sapi/fastcgi/fastcgi.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2002 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.02 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_02.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. |
- +----------------------------------------------------------------------+
- | Author: Ben Mansell <php@slimyhorror.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* Debugging */
-/* #define DEBUG_FASTCGI 1 */
-
-/* Two configurables for the FastCGI runner.
- *
- * PHP_FCGI_CHILDREN - if set, the FastCGI will pre-fork this many processes
- * which will accept requests.
- *
- * PHP_FCGI_MAX_REQUESTS - if set, the runner will kill itself after handling
- * the given number of requests. This is to curb any
- * memory leaks in PHP.
- */
-
-
-/* The following code is based mainly on the thttpd sapi and the original
- * CGI code, no doubt with many new and interesting bugs created... :)
- */
-
-#include "php.h"
-#include "SAPI.h"
-#include "php_main.h"
-#include "php_fastcgi.h"
-#include "php_variables.h"
-
-#include "fcgi_config.h"
-#include "fcgiapp.h"
-#include <stdio.h>
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef PHP_WIN32
-#include <io.h>
-#include <fcntl.h>
-#include "win32/php_registry.h"
-#else
-#include <sys/wait.h>
-#endif
-#include <sys/stat.h>
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
-#ifndef S_ISREG
-#define S_ISREG(mode) ((mode) & _S_IFREG)
-#endif
-
-FCGX_Stream *in, *out, *err;
-FCGX_ParamArray envp;
-char *path_info = NULL;
-#ifndef PHP_WIN32
-struct sigaction act, old_term, old_quit, old_int;
-#endif
-
-/* Our original environment from when the FastCGI first started */
-char **orig_env;
-
-/* The environment given by the FastCGI */
-char **cgi_env;
-
-/* The manufactured environment, from merging the base environ with
- * the parameters set by the per-connection environment
- */
-char **merge_env;
-
-/**
- * Number of child processes that will get created to service requests
- */
-static int children = 8;
-
-/**
- * Set to non-zero if we are the parent process
- */
-static int parent = 1;
-
-/**
- * Process group
- */
-static pid_t pgroup;
-
-
-static int sapi_fastcgi_ub_write(const char *str, uint str_length TSRMLS_DC)
-{
- uint sent = FCGX_PutStr( str, str_length, out );
- return sent;
-}
-
-
-static void sapi_fastcgi_flush( void *server_context )
-{
- if( FCGX_FFlush( out ) == -1 ) {
- php_handle_aborted_connection();
- }
-}
-
-
-static void sapi_fastcgi_send_header(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC)
-{
- if( sapi_header ) {
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Header: %s\n", sapi_header->header );
-#endif
- FCGX_PutStr( sapi_header->header, sapi_header->header_len, out );
- }
- FCGX_PutStr( "\r\n", 2, out );
-}
-
-static int sapi_fastcgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
-{
- size_t read_bytes = 0;
- int c;
- char *pos = buffer;
-
- while( count_bytes ) {
- c = FCGX_GetStr( pos, count_bytes, in );
- read_bytes += c;
- count_bytes -= c;
- pos += c;
- if( !c ) break;
- }
- return read_bytes;
-}
-
-static char *sapi_fastcgi_read_cookies(TSRMLS_D)
-{
- return getenv( "HTTP_COOKIE" );
-}
-
-
-static void sapi_fastcgi_register_variables(zval *track_vars_array TSRMLS_DC)
-{
- /* In CGI mode, we consider the environment to be a part of the server
- * variables
- */
- php_import_environment_variables(track_vars_array TSRMLS_CC);
-
- /* Build the special-case PHP_SELF variable for the CGI version */
- php_register_variable("PHP_SELF", (SG(request_info).request_uri ? SG(request_info).request_uri:""), track_vars_array TSRMLS_CC);
-}
-
-
-static void sapi_fastcgi_log_message(char *message)
-{
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Log Message: %s\n", message );
-#endif
- FCGX_FPrintF(err, "%s\n", message);
-}
-
-
-static sapi_module_struct fastcgi_sapi_module = {
- "fastcgi",
- "FastCGI",
-
- php_module_startup,
- php_module_shutdown_wrapper,
-
- NULL, /* activate */
- NULL, /* deactivate */
-
- sapi_fastcgi_ub_write,
- sapi_fastcgi_flush,
- NULL, /* get uid */
- NULL, /* getenv */
-
- php_error,
-
- NULL,
- NULL,
- sapi_fastcgi_send_header,
- sapi_fastcgi_read_post,
- sapi_fastcgi_read_cookies,
-
- sapi_fastcgi_register_variables,
- sapi_fastcgi_log_message,
-
- NULL, /* Block interruptions */
- NULL, /* Unblock interruptions */
-
- STANDARD_SAPI_MODULE_PROPERTIES
-};
-
-static void fastcgi_module_main(TSRMLS_D)
-{
- zend_file_handle file_handle;
- int c, retval = FAILURE;
-
- file_handle.type = ZEND_HANDLE_FILENAME;
- file_handle.filename = SG(request_info).path_translated;
- file_handle.free_filename = 0;
- file_handle.opened_path = NULL;
-
- /* eat the bang line */
- if (SG(request_info).path_translated) {
- retval = php_fopen_primary_script(&file_handle TSRMLS_CC);
- }
-
- if (retval == SUCCESS) {
- /* #!php support */
- c = fgetc(file_handle.handle.fp);
- if (c == '#') {
- while (c != 10 && c != 13) {
- c = fgetc(file_handle.handle.fp); /* skip to end of line */
- }
- CG(zend_lineno)++;
- } else {
- rewind(file_handle.handle.fp);
- }
- }
-
- if (php_request_startup(TSRMLS_C) == SUCCESS) {
- php_execute_script(&file_handle TSRMLS_CC);
- php_request_shutdown(NULL);
- }
-}
-
-
-static int init_request_info( TSRMLS_D )
-{
- char *content_length = getenv("CONTENT_LENGTH");
- char *content_type = getenv( "CONTENT_TYPE" );
- const char *auth;
- struct stat st;
- char *pi = getenv( "PATH_INFO" );
- char *pt = getenv( "PATH_TRANSLATED" );
- if (!pt) {
- pt = getenv("SCRIPT_FILENAME"); // apache mod_fastcgi sets this
- }
- path_info = strdup( pi );
-
- SG(request_info).request_method = getenv("REQUEST_METHOD");
- SG(request_info).query_string = getenv("QUERY_STRING");
- SG(request_info).request_uri = path_info;
- if (!SG(request_info).request_uri) {
- SG(request_info).request_uri = getenv("SCRIPT_NAME");
- }
- SG(request_info).content_type = ( content_type ? content_type : "" );
- SG(request_info).content_length = (content_length?atoi(content_length):0);
- SG(sapi_headers).http_response_code = 200;
-
- SG(request_info).path_translated = pt;
- if (!pt) return -1;
- /*
- * if the file doesn't exist, try to extract PATH_INFO out
- * of it by stat'ing back through the '/'
- */
- if ( stat( pt, &st ) == -1 ) {
- int len = strlen(pt);
- char *ptr;
- while( ptr = strrchr(pt,'/') ) {
- *ptr = 0;
- if ( stat(pt, &st) == 0 && S_ISREG(st.st_mode) ) {
- /*
- * okay, we found the base script!
- * work out how many chars we had to strip off;
- * then we can modify PATH_INFO
- * accordingly
- */
- int slen = len - strlen(pt);
- if ( pi ) {
- int pilen = strlen( pi );
- strcpy( pi, pi + pilen - slen );
- }
- break;
- }
- }
- /*
- * if we stripped out all the '/' and still didn't find
- * a valid path... we will fail, badly. of course we would
- * have failed anyway... is there a nice way to error?
- */
- } else {
- /* the first stat succeeded... */
- if ( pi ) *pi = 0;
- }
-
- /* The CGI RFC allows servers to pass on unvalidated Authorization data */
- auth = getenv("HTTP_AUTHORIZATION");
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Authorization: %s\n", auth );
-#endif
- php_handle_auth_data(auth TSRMLS_CC);
-
- return 0;
-}
-
-
-void fastcgi_php_init(void)
-{
- TSRMLS_FETCH();
- sapi_startup(&fastcgi_sapi_module);
- fastcgi_sapi_module.startup(&fastcgi_sapi_module);
- SG(server_context) = (void *) 1;
-}
-
-void fastcgi_php_shutdown(void)
-{
- TSRMLS_FETCH();
- if (SG(server_context) != NULL) {
- fastcgi_sapi_module.shutdown(&fastcgi_sapi_module);
- sapi_shutdown();
- }
-}
-
-
-/**
- * Clean up child processes upon exit
- */
-void fastcgi_cleanup(int signal)
-{
-
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "FastCGI shutdown, pid %d\n", getpid() );
-#endif
-
-#ifndef PHP_WIN32
- sigaction( SIGTERM, &old_term, 0 );
-
- /* Kill all the processes in our process group */
- kill( -pgroup, SIGTERM );
-#endif
-
- /* We should exit at this point, but MacOSX doesn't seem to */
- exit( 0 );
-}
-
-
-int main(int argc, char *argv[])
-{
- int exit_status = SUCCESS;
-#ifndef PHP_WIN32
- int c, i, len;
- zend_file_handle file_handle;
- char *s;
- int status;
-#endif
- char *argv0=NULL;
- char *script_file=NULL;
- zend_llist global_vars;
- int max_requests = 500;
- int requests = 0;
- int env_size, cgi_env_size;
-#ifdef ZTS
- zend_compiler_globals *compiler_globals;
- zend_executor_globals *executor_globals;
- php_core_globals *core_globals;
- sapi_globals_struct *sapi_globals;
- void ***tsrm_ls;
-#endif
-
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Initialising now, pid %d!\n", getpid() );
-#endif
-
- if( FCGX_IsCGI() ) {
- fprintf( stderr, "The FastCGI version of PHP cannot be "
- "run as a CGI application\n" );
- exit( 1 );
- }
-
- /* Calculate environment size */
- env_size = 0;
- while( environ[ env_size ] ) { env_size++; }
- /* Also include the final NULL pointer */
- env_size++;
-
- /* Allocate for our environment */
- orig_env = malloc( env_size * sizeof( char *));
- if( !orig_env ) {
- perror( "Can't malloc environment" );
- exit( 1 );
- }
- memcpy( orig_env, environ, env_size * sizeof( char *));
-
-#ifdef HAVE_SIGNAL_H
-#if defined(SIGPIPE) && defined(SIG_IGN)
- signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
- that sockets created via fsockopen()
- don't kill PHP if the remote site
- closes it. in apache|apxs mode apache
- does that for us! thies@thieso.net
- 20000419 */
-#endif
-#endif
-
-#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
-#endif
- sapi_startup(&fastcgi_sapi_module);
-#ifdef PHP_WIN32
- _fmode = _O_BINARY; /*sets default for file streams to binary */
- setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
- setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
-#endif
-
- if (php_module_startup(&fastcgi_sapi_module)==FAILURE) {
- return FAILURE;
- }
-#ifdef ZTS
- compiler_globals = ts_resource(compiler_globals_id);
- executor_globals = ts_resource(executor_globals_id);
- core_globals = ts_resource(core_globals_id);
- sapi_globals = ts_resource(sapi_globals_id);
- tsrm_ls = ts_resource(0);
-#endif
-
- /* How many times to run PHP scripts before dying */
- if( getenv( "PHP_FCGI_MAX_REQUESTS" )) {
- max_requests = atoi( getenv( "PHP_FCGI_MAX_REQUESTS" ));
- if( !max_requests ) {
- fprintf( stderr,
- "PHP_FCGI_MAX_REQUESTS is not valid\n" );
- exit( 1 );
- }
- }
-
-#ifndef PHP_WIN32
- /* Pre-fork, if required */
- if( getenv( "PHP_FCGI_CHILDREN" )) {
- children = atoi( getenv( "PHP_FCGI_CHILDREN" ));
- if( !children ) {
- fprintf( stderr,
- "PHP_FCGI_CHILDREN is not valid\n" );
- exit( 1 );
- }
- }
-
- if( children ) {
- int running = 0;
- int i;
- pid_t pid;
-
- /* Create a process group for ourself & children */
- setsid();
- pgroup = getpgrp();
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Process group %d\n", pgroup );
-#endif
-
- /* Set up handler to kill children upon exit */
- act.sa_flags = 0;
- act.sa_handler = fastcgi_cleanup;
- if( sigaction( SIGTERM, &act, &old_term ) ||
- sigaction( SIGINT, &act, &old_int ) ||
- sigaction( SIGQUIT, &act, &old_quit )) {
- perror( "Can't set signals" );
- exit( 1 );
- }
-
- while( parent ) {
- do {
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Forking, %d running\n",
- running );
-#endif
- pid = fork();
- switch( pid ) {
- case 0:
- /* One of the children.
- * Make sure we don't go round the
- * fork loop any more
- */
- parent = 0;
-
- /* don't catch our signals */
- sigaction( SIGTERM, &old_term, 0 );
- sigaction( SIGQUIT, &old_quit, 0 );
- sigaction( SIGINT, &old_int, 0 );
- break;
- case -1:
- perror( "php (pre-forking)" );
- exit( 1 );
- break;
- default:
- /* Fine */
- running++;
- break;
- }
- } while( parent && ( running < children ));
-
- if( parent ) {
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Wait for kids, pid %d\n",
- getpid() );
-#endif
- wait( &status );
- running--;
- }
- }
- }
-
-#endif /* WIN32 */
-
- /* Main FastCGI loop */
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Going into accept loop\n" );
-#endif
-
- while( FCGX_Accept( &in, &out, &err, &cgi_env ) >= 0 ) {
-
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Got accept\n" );
-#endif
-
- cgi_env_size = 0;
- while( cgi_env[ cgi_env_size ] ) { cgi_env_size++; }
- merge_env = malloc( (env_size+cgi_env_size)*sizeof(char*) );
- if( !merge_env ) {
- perror( "Can't malloc environment" );
- exit( 1 );
- }
- memcpy( merge_env, orig_env, (env_size-1)*sizeof(char *) );
- memcpy( merge_env + env_size - 1,
- cgi_env, (cgi_env_size+1)*sizeof(char *) );
- environ = merge_env;
-
- if (init_request_info(TSRMLS_C)!=0) {
- /* we received some invalid environment */
- //char *b = "Can't init the request\n";
- //sapi_fastcgi_ub_write(b, strlen(b) TSRMLS_C);
- //FCGX_Finish();
- //break;
- }
- SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */
- SG(request_info).argv0 = argv0;
- zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
-
- fastcgi_module_main(TSRMLS_C);
- if( path_info ) {
- free( path_info );
- path_info = NULL;
- }
-
- /* TODO: We should free our environment here, but
- * some platforms are unhappy if they've altered our
- * existing environment and we then free() the new
- * environ pointer
- */
-
- requests++;
- if( max_requests && ( requests == max_requests )) {
- FCGX_Finish();
- break;
- }
- }
-
-#ifdef ZTS
- tsrm_shutdown();
-#endif
-#ifdef DEBUG_FASTCGI
- fprintf( stderr, "Exiting...\n" );
-#endif
- return 0;
-}
diff --git a/sapi/fastcgi/fastcgi.dsp b/sapi/fastcgi/fastcgi.dsp
deleted file mode 100644
index 27269550ac..0000000000
--- a/sapi/fastcgi/fastcgi.dsp
+++ /dev/null
@@ -1,195 +0,0 @@
-# Microsoft Developer Studio Project File - Name="fastcgi" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=fastcgi - Win32 Debug_TS
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "fastcgi.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "fastcgi.mak" CFG="fastcgi - Win32 Debug_TS"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "fastcgi - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "fastcgi - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "fastcgi - Win32 Debug_TS" (based on "Win32 (x86) Console Application")
-!MESSAGE "fastcgi - Win32 Release_TS" (based on "Win32 (x86) Console Application")
-!MESSAGE "fastcgi - Win32 Release_TS_inline" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "fastcgi - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\..\Release"
-# PROP Intermediate_Dir "..\..\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 php4nts.lib libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:4.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\Release/phpfcgi.exe" /libpath:"..\..\Release" /libpath:"fcgi\lib"
-
-!ELSEIF "$(CFG)" == "fastcgi - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "DEBUG" /D "_DEBUG" /D "_CONSOLE" /D "MSVC5" /D "PHP_WIN32" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4nts_debug.lib /nologo /version:4.0 /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"..\Debug\phpfcgi.exe" /pdbtype:sept /libpath:"..\..\Debug" /libpath:"fcgi\lib"
-
-!ELSEIF "$(CFG)" == "fastcgi - Win32 Debug_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "fastcgi___Win32_Debug_TS"
-# PROP BASE Intermediate_Dir "fastcgi___Win32_Debug_TS"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_TS"
-# PROP Intermediate_Dir "Debug_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "DEBUG" /D "_DEBUG" /D "_CONSOLE" /D "MSVC5" /D "PHP_WIN32" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "DEBUG" /D "_DEBUG" /D "_CONSOLE" /D "MSVC5" /D "PHP_WIN32" /D "ZTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4nts_debug.lib /nologo /version:4.0 /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"c:\php-fcgi\php-fcgi.exe" /pdbtype:sept /libpath:"..\..\Debug" /libpath:"fcgi\lib"
-# ADD LINK32 libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts_debug.lib /nologo /version:4.0 /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"..\..\Debug_TS\phpfcgi.exe" /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"fcgi\lib"
-
-!ELSEIF "$(CFG)" == "fastcgi - Win32 Release_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "fastcgi___Win32_Release_TS"
-# PROP BASE Intermediate_Dir "fastcgi___Win32_Release_TS"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_TS"
-# PROP Intermediate_Dir "Release_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "ZTS" /Fr /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 php4nts.lib libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:4.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\Release/php-fcgi.exe" /libpath:"..\..\Release" /libpath:"fcgi\lib"
-# ADD LINK32 php4ts.lib libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:4.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\Release_TS/phpfcgi.exe" /libpath:"..\..\Release_TS" /libpath:"fcgi\lib"
-
-!ELSEIF "$(CFG)" == "fastcgi - Win32 Release_TS_inline"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "fastcgi___Win32_Release_TS_inline"
-# PROP BASE Intermediate_Dir "fastcgi___Win32_Release_TS_inline"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_TS_inline"
-# PROP Intermediate_Dir "Release_TS_inline"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "ZTS" /Fr /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\regex\\" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "fcgi\include" /D "NDEBUG" /D "_CONSOLE" /D "ZEND_WIN32_FORCE_INLINE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "ZTS" /Fr /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 php4ts.lib libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:4.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\Release_TS/phpfcgi.exe" /libpath:"..\..\Release_TS" /libpath:"fcgi\lib"
-# ADD LINK32 php4ts.lib libfcgi.lib winmm.lib wsock32.lib netapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:4.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\Release_TS_inline/phpfcgi.exe" /libpath:"..\..\Release_TS_inline" /libpath:"fcgi\lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "fastcgi - Win32 Release"
-# Name "fastcgi - Win32 Debug"
-# Name "fastcgi - Win32 Debug_TS"
-# Name "fastcgi - Win32 Release_TS"
-# Name "fastcgi - Win32 Release_TS_inline"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\fastcgi.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\php_fastcgi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/sapi/fastcgi/php.sym b/sapi/fastcgi/php.sym
deleted file mode 100644
index e69de29bb2..0000000000
--- a/sapi/fastcgi/php.sym
+++ /dev/null
diff --git a/sapi/fastcgi/php_fastcgi.h b/sapi/fastcgi/php_fastcgi.h
deleted file mode 100644
index 60f93e21b9..0000000000
--- a/sapi/fastcgi/php_fastcgi.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2002 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.02 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_02.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. |
- +----------------------------------------------------------------------+
- | Author: Sascha Schumann <sascha@schumann.cx> |
- +----------------------------------------------------------------------+
-*/
-
-#ifndef PHP_FASTCGI_H
-#define PHP_FASTCGI_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-void fastcgi_php_shutdown(void);
-void fastcgi_php_init(void);
-
-#endif
diff --git a/sapi/fastcgi/windows.txt b/sapi/fastcgi/windows.txt
deleted file mode 100644
index fc12b0aaba..0000000000
--- a/sapi/fastcgi/windows.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Windows support is currently experimental.
-
-Tested under IIS with cgi-fcgi.exe and Apache with mod_fastcgi.
-
-Compilation:
-Currently only supports Non-Thread safe compilation, however,
-that is realy all that is needed :)
-
-Get the devkit from www.fastcgi.com, build it.
-Create the directories
- php4/sapi/fastcgi/fcgi
- php4/sapi/fastcgi/fcgi/include
- php4/sapi/fastcgi/fcgi/lib
-Place headers and libs in the include and lib directories.
-Load the php.dsw, and compile.
-
-IIS configuration:
-
-Under the application configuration in the IIS configuration program, use:
-.php C:\php-fcgi\cgi-fcgi.exe -connect php c:\php-fcgi\php-fcgi.exe
-
-Apache Configuration:
-
-LoadModule fastcgi_module modules/mod_fastcgi.dll
-<IfModule mod_fastcgi.c>
-AddHandler fastcgi-script fphp php
-</IfModule>
-
-The scripts require the bang line as the first line
-of the script to work with mod_fastcgi,
-#!c:/php-fcgi/php-fcgi.exe
-
-TODO:
-make 'thread-safe' compilation, though it isn't necessary.
-