cvs: /php4/sapi/apache php_apache_http.h /php4 acconfig.h.in acinclude.m4 config.w32.h fopen-wrappers.c internal_functions_registry.h php.h
php_regex.h request_info.c request_info.h snprintf.c snprintf.h win95nt.h /php4/ext/aspell aspell.c /php4/ext/db db.c /php4/ext/hyperwave hg_comm.c
/php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c /php4/ext/posix posix.c /php4/ext/standard basic_functions.c browscap.c dl.c exec.c head.c mail.c
php_string.h string.c url.c /php4/sapi/apache config.m4 mod_php4.c php_apache.c /php4/sapi/cgi cgi_main.c
| From: | Zeev Suraski | Date: | Thu, 10 Feb 2000 19:41:50 +0000 |
| Subject: | cvs: /php4/sapi/apache php_apache_http.h /php4 acconfig.h.in acinclude.m4 config.w32.h fopen-wrappers.c internal_functions_registry.h php.h php_regex.h request_info.c request_info.h snprintf.c snprintf.h win95nt.h /php4/ext/aspell aspell.c /php4/ext/db db.c /php4/ext/hyperwave hg_comm.c /php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c /php4/ext/posix posix.c /php4/ext/standard basic_functions.c browscap.c dl.c exec.c head.c mail.c php_string.h string.c url.c /php4/sapi/apache config.m4 mod_php4.c php_apache.c /php4/sapi/cgi cgi_main.c |
||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10060@lists.php.net to get a copy of this message | ||
zeev Thu Feb 10 11:41:50 2000 EDT
Added files:
/php4/sapi/apache php_apache_http.h
Modified files:
/php4 acconfig.h.in acinclude.m4 config.w32.h fopen-wrappers.c
internal_functions_registry.h php.h php_regex.h
request_info.c request_info.h snprintf.c snprintf.h win95nt.h
/php4/ext/aspell aspell.c
/php4/ext/db db.c
/php4/ext/hyperwave hg_comm.c
/php4/ext/mysql php_mysql.c
/php4/ext/oci8 oci8.c
/php4/ext/posix posix.c
/php4/ext/standard basic_functions.c browscap.c dl.c exec.c head.c
mail.c php_string.h string.c url.c
/php4/sapi/apache config.m4 mod_php4.c php_apache.c
/php4/sapi/cgi cgi_main.c
Log:
SAPIfication, Episode VI: Return of the SAPI
Remove mostly all references to APACHE and CGI_BINARY from the code.
- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.
Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
include them, without having to fear any interference with Apache;
Always use the bundled regex library
Index: php4/acconfig.h.in
diff -u php4/acconfig.h.in:1.33 php4/acconfig.h.in:1.34
--- php4/acconfig.h.in:1.33 Wed Jan 12 11:09:59 2000
+++ php4/acconfig.h.in Thu Feb 10 11:41:18 2000
@@ -74,9 +74,6 @@
/* Define if you have the sendmail program available */
#define HAVE_SENDMAIL 0
-/* Define if you are compiling PHP as an Apache module */
-#define APACHE 0
-
/* Define if you are compiling PHP as an Apache module with mod_charset patch applied (aka Russian
Apache)*/
#define USE_TRANSFER_TABLES 0
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.60 php4/acinclude.m4:1.61
--- php4/acinclude.m4:1.60 Thu Feb 10 10:07:30 2000
+++ php4/acinclude.m4 Thu Feb 10 11:41:18 2000
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.60 2000/02/10 18:07:30 sas Exp $
+dnl $Id: acinclude.m4,v 1.61 2000/02/10 19:41:18 zeev Exp $
dnl
dnl This file contains local autoconf functions.
@@ -295,8 +295,6 @@
PHP_FAST_OUTPUT(regex/Makefile)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0)
-elif test "$REGEX_TYPE" = "apache"; then
- AC_DEFINE(REGEX,2)
fi
AC_MSG_CHECKING(which regex library to use)
Index: php4/config.w32.h
diff -u php4/config.w32.h:1.18 php4/config.w32.h:1.19
--- php4/config.w32.h:1.18 Wed Feb 2 10:42:02 2000
+++ php4/config.w32.h Thu Feb 10 11:41:18 2000
@@ -97,8 +97,6 @@
will move to the "don't touch" list below eventualy.
---------------------------------------------------------------*/
-/*#define APACHE 0 defined in preprocessor section*/
-
/* ----------------------------------------------------------------
The following should never need to be played with
Index: php4/fopen-wrappers.c
diff -u php4/fopen-wrappers.c:1.38 php4/fopen-wrappers.c:1.39
--- php4/fopen-wrappers.c:1.38 Thu Feb 10 09:14:05 2000
+++ php4/fopen-wrappers.c Thu Feb 10 11:41:18 2000
@@ -16,7 +16,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.38 2000/02/10 17:14:05 andi Exp $ */
+/* $Id: fopen-wrappers.c,v 1.39 2000/02/10 19:41:18 zeev Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -208,7 +208,6 @@
}
}
-#if CGI_BINARY || FHTTPD || USE_SAPI
PHPAPI FILE *php_fopen_primary_script(void)
{
@@ -307,7 +306,6 @@
return fp;
}
-#endif /* CGI_BINARY || USE_SAPI */
/*
* Tries to open a file with a PATH-style list of directories.
Index: php4/internal_functions_registry.h
diff -u php4/internal_functions_registry.h:1.6 php4/internal_functions_registry.h:1.7
--- php4/internal_functions_registry.h:1.6 Tue Feb 1 22:08:59 2000
+++ php4/internal_functions_registry.h Thu Feb 10 11:41:18 2000
@@ -18,22 +18,12 @@
*/
-/* $Id: internal_functions_registry.h,v 1.6 2000/02/02 06:08:59 andrei Exp $ */
+/* $Id: internal_functions_registry.h,v 1.7 2000/02/10 19:41:18 zeev Exp $ */
#ifndef _INTERNAL_FUNCTIONS_REGISTRY_H
#define _INTERNAL_FUNCTIONS_REGISTRY_H
extern int php_init_mime(INIT_FUNC_ARGS);
-
-#if 0
-#if APACHE
-extern zend_module_entry apache_module_entry;
-#define phpext_apache_ptr &apache_module_entry
-extern void php_virtual(INTERNAL_FUNCTION_PARAMETERS);
-#else
-#define phpext_apache_ptr NULL
-#endif
-#endif
/* environment functions */
extern int php_init_environment(void);
Index: php4/php.h
diff -u php4/php.h:1.59 php4/php.h:1.60
--- php4/php.h:1.59 Thu Feb 10 09:22:25 2000
+++ php4/php.h Thu Feb 10 11:41:18 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.59 2000/02/10 17:22:25 andi Exp $ */
+/* $Id: php.h,v 1.60 2000/02/10 19:41:18 zeev Exp $ */
#ifndef _PHP_H
#define _PHP_H
@@ -30,8 +30,6 @@
#define YYDEBUG 0
-#define CGI_BINARY (!APACHE && !USE_SAPI && !FHTTPD)
-
#include "php_version.h"
#include "zend.h"
@@ -89,6 +87,8 @@
#define inline
#endif
+#define APACHE 0
+#define CGI_BINARY 0
#if HAVE_UNIX_H
#include <unix.h>
@@ -116,19 +116,6 @@
#include "request_info.h"
-#if HAVE_LIBDL
-# if MSVC5
-# include <windows.h>
-# define dlclose FreeLibrary
-# define dlopen(a,b) LoadLibrary(a)
-# define dlsym GetProcAddress
-# else
-#if HAVE_DLFCN_H && !((defined(_AIX) || defined(AIX)) && APACHE)
-# include <dlfcn.h>
-#endif
-# endif
-#endif
-
#define CREATE_MUTEX(a,b)
#define SET_MUTEX(a)
#define FREE_MUTEX(a)
@@ -180,35 +167,6 @@
#include "fopen-wrappers.h"
-#if APACHE /* apache httpd */
-# if HAVE_AP_CONFIG_H
-#include "ap_config_auto.h"
-#ifdef RHAPSODY
-#undef HAVE_SNPRINTF
-#endif
-#include "ap_config.h"
-#ifdef RHAPSODY
-#undef HAVE_SNPRINTF
-#define HAVE_SNPRINTF 1
-#endif
-# endif
-# if HAVE_OLD_COMPAT_H
-#include "compat.h"
-# endif
-# if HAVE_AP_COMPAT_H
-#include "ap_compat.h"
-# endif
-#include "httpd.h"
-#include "http_main.h"
-#include "http_core.h"
-#include "http_request.h"
-#include "http_protocol.h"
-#include "http_config.h"
-#include "http_log.h"
-#define BLOCK_INTERRUPTIONS block_alarms
-#define UNBLOCK_INTERRUPTIONS unblock_alarms
-#endif
-
#if REGEX == 1 || REGEX == 0
#include "regex/regex_extra.h"
#endif
@@ -222,10 +180,6 @@
#include <sys/param.h>
# endif
#endif
-#if CGI_BINARY /* CGI version */
-#define BLOCK_INTERRUPTIONS NULL
-#define UNBLOCK_INTERRUPTIONS NULL
-#endif
#if HAVE_LIMITS_H
#include <limits.h>
@@ -292,6 +246,7 @@
extern pval *data;
#if !(PHP_WIN32)
extern char **environ;
+#define php_sleep sleep
#endif
extern void phperror(char *error);
Index: php4/php_regex.h
diff -u php4/php_regex.h:1.9 php4/php_regex.h:1.10
--- php4/php_regex.h:1.9 Tue Nov 30 15:19:33 1999
+++ php4/php_regex.h Thu Feb 10 11:41:18 2000
@@ -5,10 +5,9 @@
* REGEX means:
* 0.. system regex
* 1.. bundled regex
- * 2.. Apache's regex
*/
-#if REGEX == 1
+#if REGEX
/* get aliases */
#include "regex/regex_extra.h"
#include "regex/regex.h"
Index: php4/request_info.c
diff -u php4/request_info.c:1.23 php4/request_info.c:1.24
--- php4/request_info.c:1.23 Thu Feb 10 09:14:05 2000
+++ php4/request_info.c Thu Feb 10 11:41:18 2000
@@ -26,8 +26,6 @@
#if CGI_BINARY
int php_init_request_info(void *conf)
{
- request_info.current_user = NULL;
- request_info.current_user_length = 0;
request_info.script_name = getenv("SCRIPT_NAME");
request_info.script_filename = getenv("SCRIPT_FILENAME");
/* Hack for annoying servers that do not set SCRIPT_FILENAME for us */
@@ -79,8 +77,6 @@
SLS_FETCH();
r = ((request_rec *) SG(server_context));
- request_info.current_user = NULL;
- request_info.current_user_length = 0;
return SUCCESS;
}
@@ -95,8 +91,18 @@
return SUCCESS;
}
#endif
-/*
- * Local variables:
+
+
+int php_init_request_info(void *conf)
+{
+ request_info.current_user = NULL;
+ request_info.current_user_length = 0;
+ return SUCCESS;
+}
+
+
+
+/* * Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
Index: php4/request_info.h
diff -u php4/request_info.h:1.9 php4/request_info.h:1.10
--- php4/request_info.h:1.9 Fri Dec 31 17:31:27 1999
+++ php4/request_info.h Thu Feb 10 11:41:18 2000
@@ -20,7 +20,6 @@
#define _REQUEST_INFO_H_
typedef struct {
- char *script_name;
char *current_user;
int current_user_length;
const char *script_filename;
Index: php4/snprintf.c
diff -u php4/snprintf.c:1.3 php4/snprintf.c:1.4
--- php4/snprintf.c:1.3 Sat Jul 31 12:53:02 1999
+++ php4/snprintf.c Thu Feb 10 11:41:18 2000
@@ -55,7 +55,6 @@
#include "php.h"
-#if !defined(APACHE) || (!APACHE)
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include <stdio.h>
@@ -69,9 +68,9 @@
#ifdef HAVE_GCVT
-#define ap_ecvt ecvt
-#define ap_fcvt fcvt
-#define ap_gcvt gcvt
+#define ap_php_ecvt ecvt
+#define ap_php_fcvt fcvt
+#define ap_php_gcvt gcvt
#else
@@ -81,7 +80,7 @@
*/
/*
- * ap_ecvt converts to decimal
+ * ap_php_ecvt converts to decimal
* the number of digits is specified by ndigit
* decpt is set to the position of the decimal point
* sign is set to 0 for positive, 1 for negative
@@ -90,7 +89,7 @@
#define NDIG 80
static char *
- ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
+ ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
{
register int r2;
double fi, fj;
@@ -164,30 +163,30 @@
}
static char *
- ap_ecvt(double arg, int ndigits, int *decpt, int *sign)
+ ap_php_ecvt(double arg, int ndigits, int *decpt, int *sign)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 1));
+ return (ap_php_cvt(arg, ndigits, decpt, sign, 1));
}
static char *
- ap_fcvt(double arg, int ndigits, int *decpt, int *sign)
+ ap_php_fcvt(double arg, int ndigits, int *decpt, int *sign)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 0));
+ return (ap_php_cvt(arg, ndigits, decpt, sign, 0));
}
/*
- * ap_gcvt - Floating output conversion to
+ * ap_php_gcvt - Floating output conversion to
* minimal length string
*/
static char *
- ap_gcvt(double number, int ndigit, char *buf)
+ ap_php_gcvt(double number, int ndigit, char *buf)
{
int sign, decpt;
register char *p1, *p2;
register i;
- p1 = ap_ecvt(number, ndigit, &decpt, &sign);
+ p1 = ap_php_ecvt(number, ndigit, &decpt, &sign);
p2 = buf;
if (sign)
*p2++ = '-';
@@ -413,9 +412,9 @@
int decimal_point;
if (format == 'f')
- p = ap_fcvt(num, precision, &decimal_point, is_negative);
+ p = ap_php_fcvt(num, precision, &decimal_point, is_negative);
else /* either e or E format */
- p = ap_ecvt(num, precision + 1, &decimal_point, is_negative);
+ p = ap_php_ecvt(num, precision + 1, &decimal_point, is_negative);
/*
* Check for Infinity and NaN
@@ -765,7 +764,7 @@
/*
* * We use &num_buf[ 1 ], so that we have room for the sign
*/
- s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1]);
+ s = ap_php_gcvt(va_arg(ap, double), precision, &num_buf[1]);
if (*s == '-')
prefix_char = *s++;
else if (print_sign)
@@ -910,7 +909,7 @@
}
-int ap_snprintf(char *buf, size_t len, const char *format,...)
+int ap_php_snprintf(char *buf, size_t len, const char *format,...)
{
int cc;
va_list ap;
@@ -922,7 +921,7 @@
}
-int ap_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
+int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
{
int cc;
@@ -931,4 +930,3 @@
}
#endif /* HAVE_SNPRINTF */
-#endif /* APACHE */
Index: php4/snprintf.h
diff -u php4/snprintf.h:1.4 php4/snprintf.h:1.5
--- php4/snprintf.h:1.4 Fri Dec 31 17:31:27 1999
+++ php4/snprintf.h Thu Feb 10 11:41:18 2000
@@ -16,17 +16,17 @@
+----------------------------------------------------------------------+
*/
-#ifndef _PHP3_SNPRINTF_H
-#define _PHP3_SNPRINTF_H
+#ifndef _PHP_SNPRINTF_H
+#define _PHP_SNPRINTF_H
#ifndef HAVE_SNPRINTF
-extern int ap_snprintf(char *, size_t, const char *, ...);
-#define snprintf ap_snprintf
+extern int ap_php_snprintf(char *, size_t, const char *, ...);
+#define snprintf ap_php_snprintf
#endif
#ifndef HAVE_VSNPRINTF
-extern int ap_vsnprintf(char *, size_t, const char *, va_list ap);
-#define vsnprintf ap_vsnprintf
+extern int ap_php_vsnprintf(char *, size_t, const char *, va_list ap);
+#define vsnprintf ap_php_vsnprintf
#endif
#if BROKEN_SPRINTF
@@ -35,7 +35,7 @@
#define php_sprintf sprintf
#endif
-#endif /* _PHP3_SNPRINTF_H */
+#endif /* _PHP_SNPRINTF_H */
/*
* Local variables:
Index: php4/win95nt.h
diff -u php4/win95nt.h:1.2 php4/win95nt.h:1.3
--- php4/win95nt.h:1.2 Fri Dec 31 18:22:00 1999
+++ php4/win95nt.h Thu Feb 10 11:41:18 2000
@@ -25,9 +25,7 @@
#define mkdir(a,b) _mkdir(a)
#define rmdir _rmdir
#define getpid _getpid
-#if !(APACHE)
-#define sleep(t) Sleep(t*1000)
-#endif
+#define php_sleep(t) Sleep(t*1000)
#define getcwd _getcwd
#define snprintf _snprintf
#define off_t _off_t
Index: php4/ext/aspell/aspell.c
diff -u php4/ext/aspell/aspell.c:1.12 php4/ext/aspell/aspell.c:1.13
--- php4/ext/aspell/aspell.c:1.12 Fri Dec 31 17:31:28 1999
+++ php4/ext/aspell/aspell.c Thu Feb 10 11:41:18 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aspell.c,v 1.12 2000/01/01 01:31:28 sas Exp $ */
+/* $Id: aspell.c,v 1.13 2000/02/10 19:41:18 zeev Exp $ */
#include "php.h"
#if defined(COMPILE_DL)
@@ -29,11 +29,6 @@
#if HAVE_ASPELL
#include "php_aspell.h"
-#if APACHE
-# ifndef DEBUG
-# undef palloc
-# endif
-#endif
#include <aspell-c.h>
function_entry aspell_functions[] = {
Index: php4/ext/db/db.c
diff -u php4/ext/db/db.c:1.21 php4/ext/db/db.c:1.22
--- php4/ext/db/db.c:1.21 Sat Feb 5 07:16:09 2000
+++ php4/ext/db/db.c Thu Feb 10 11:41:18 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: db.c,v 1.21 2000/02/05 15:16:09 zeev Exp $ */
+/* $Id: db.c,v 1.22 2000/02/10 19:41:18 zeev Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
# include "dl/phpdl.h"
@@ -317,7 +317,7 @@
#if NFS_HACK
while((last_try = stat(lockfn,&sb))==0) {
retries++;
- sleep(1);
+ php_sleep(1);
if (retries>30) break;
}
if (last_try!=0) {
Index: php4/ext/hyperwave/hg_comm.c
diff -u php4/ext/hyperwave/hg_comm.c:1.18 php4/ext/hyperwave/hg_comm.c:1.19
--- php4/ext/hyperwave/hg_comm.c:1.18 Wed Feb 2 03:18:01 2000
+++ php4/ext/hyperwave/hg_comm.c Thu Feb 10 11:41:18 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hg_comm.c,v 1.18 2000/02/02 11:18:01 steinm Exp $ */
+/* $Id: hg_comm.c,v 1.19 2000/02/10 19:41:18 zeev Exp $ */
/* #define HW_DEBUG */
@@ -1137,7 +1137,7 @@
if ( (errno == EAGAIN) || (errno == EWOULDBLOCK) ) {
if ( ++try > 5 )
return(-1);
- sleep(1);
+ php_sleep(1);
}
else return(-1);
}
@@ -1159,7 +1159,7 @@
if ( (errno == EAGAIN) || (errno == EWOULDBLOCK) ) {
if ( ++try > 5 )
return(-1);
- sleep(1);
+ php_sleep(1);
}
else return(-1);
}
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.26 php4/ext/mysql/php_mysql.c:1.27
--- php4/ext/mysql/php_mysql.c:1.26 Sat Feb 5 09:26:35 2000
+++ php4/ext/mysql/php_mysql.c Thu Feb 10 11:41:19 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.26 2000/02/05 17:26:35 zeev Exp $ */
+/* $Id: php_mysql.c,v 1.27 2000/02/10 19:41:19 zeev Exp $ */
/* TODO:
@@ -158,9 +158,6 @@
DLEXPORT zend_module_entry *get_module(void) { return &mysql_module_entry; }
#endif
-#if APACHE
-void timeout(int sig);
-#endif
#define CHECK_LINK(link) { if (link==-1) { php_error(E_WARNING,"MySQL: A link to the server
could not be established"); RETURN_FALSE; } }
@@ -187,42 +184,19 @@
static void _close_mysql_link(MYSQL *link)
{
-#if APACHE
- void (*handler) (int);
-#endif
MySLS_FETCH();
-#if APACHE
- handler = signal(SIGPIPE, SIG_IGN);
-#endif
-
mysql_close(link);
-
-#if APACHE
- signal(SIGPIPE,handler);
-#endif
-
efree(link);
MySG(num_links)--;
}
static void _close_mysql_plink(MYSQL *link)
{
-#if APACHE
- void (*handler) (int);
-#endif
MySLS_FETCH();
-#if APACHE
- handler = signal(SIGPIPE, SIG_IGN);
-#endif
-
mysql_close(link);
-#if APACHE
- signal(SIGPIPE,handler);
-#endif
-
free(link);
MySG(num_persistent)--;
MySG(num_links)--;
@@ -338,9 +312,6 @@
static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
{
-#if APACHE
- void (*handler) (int);
-#endif
char *user,*passwd,*host,*socket=NULL,*tmp;
char *hashed_details;
int hashed_details_length,port = MYSQL_PORT;
@@ -478,18 +449,12 @@
RETURN_FALSE;
}
/* ensure that the link did not die */
-#if APACHE
- handler=signal(SIGPIPE,SIG_IGN);
-#endif
#if defined(HAVE_MYSQL_ERRNO) && defined(CR_SERVER_GONE_ERROR)
mysql_stat(le->ptr);
if (mysql_errno((MYSQL *)le->ptr) == CR_SERVER_GONE_ERROR) {
#else
if (!strcasecmp(mysql_stat(le->ptr),"mysql server has gone away")) { /* the link
died */
#endif
-#if APACHE
- signal(SIGPIPE,handler);
-#endif
#if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */
if (mysql_real_connect(le->ptr,host,user,passwd,NULL,port,socket,0)==NULL) {
#else
@@ -501,9 +466,6 @@
RETURN_FALSE;
}
}
-#if APACHE
- signal(SIGPIPE,handler);
-#endif
mysql = (MYSQL *) le->ptr;
}
ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink);
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.53 php4/ext/oci8/oci8.c:1.54
--- php4/ext/oci8/oci8.c:1.53 Mon Feb 7 02:31:43 2000
+++ php4/ext/oci8/oci8.c Thu Feb 10 11:41:19 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.53 2000/02/07 10:31:43 thies Exp $ */
+/* $Id: oci8.c,v 1.54 2000/02/10 19:41:19 zeev Exp $ */
/* TODO list:
*
@@ -1642,7 +1642,7 @@
case OCI_FO_ERROR:
{
printf(" Failover error gotten. Sleeping...\n");
- sleep(3);
+ php_sleep(3);
/* cannot find this blody define !!! return OCI_FO_RETRY; */
break;
}
Index: php4/ext/posix/posix.c
diff -u php4/ext/posix/posix.c:1.5 php4/ext/posix/posix.c:1.6
--- php4/ext/posix/posix.c:1.5 Mon Dec 20 07:23:38 1999
+++ php4/ext/posix/posix.c Thu Feb 10 11:41:19 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.5 1999/12/20 15:23:38 andrei Exp $ */
+/* $Id: posix.c,v 1.6 2000/02/10 19:41:19 zeev Exp $ */
#include "php.h"
@@ -132,13 +132,9 @@
DLEXPORT zend_module_entry *get_module(void) { return &posix__module_entry; }
#endif
-#if APACHE
-void timeout(int sig);
-#endif
-
static PHP_MINFO_FUNCTION(posix)
{
- PUTS("$Revision: 1.5 $\n");
+ PUTS("$Revision: 1.6 $\n");
}
/* {{{ proto int posix_kill(int pid, int sig)
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.156 php4/ext/standard/basic_functions.c:1.157
--- php4/ext/standard/basic_functions.c:1.156 Thu Feb 10 09:54:59 2000
+++ php4/ext/standard/basic_functions.c Thu Feb 10 11:41:19 2000
@@ -664,7 +664,7 @@
WRONG_PARAM_COUNT;
}
convert_to_long_ex(num);
- sleep((*num)->value.lval);
+ php_sleep((*num)->value.lval);
}
PHP_FUNCTION(usleep)
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.20 php4/ext/standard/browscap.c:1.21
--- php4/ext/standard/browscap.c:1.20 Sat Feb 5 07:44:18 2000
+++ php4/ext/standard/browscap.c Thu Feb 10 11:41:19 2000
@@ -17,6 +17,7 @@
*/
#include "php.h"
+#include "php_regex.h"
#include "php_browscap.h"
#include "php_ini.h"
Index: php4/ext/standard/dl.c
diff -u php4/ext/standard/dl.c:1.21 php4/ext/standard/dl.c:1.22
--- php4/ext/standard/dl.c:1.21 Sat Feb 5 07:16:11 2000
+++ php4/ext/standard/dl.c Thu Feb 10 11:41:19 2000
@@ -104,7 +104,7 @@
}
/* load dynamic symbol */
- handle = dlopen(libpath, RTLD_LAZY);
+ handle = DL_LOAD(libpath);
if (!handle) {
int error_type;
@@ -120,10 +120,10 @@
#endif
RETURN_FALSE;
}
- get_module = (zend_module_entry *(*)(void)) dlsym(handle, "get_module");
+ get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module");
if (!get_module) {
- dlclose(handle);
+ DL_UNLOAD(handle);
php_error(E_CORE_WARNING,"Invalid library (maybe not a PHP library) '%s'
",file->value.str.val);
RETURN_FALSE;
}
@@ -133,7 +133,7 @@
if (module_entry->module_startup_func) {
if (module_entry->module_startup_func(type, module_entry->module_number ELS_CC)==FAILURE) {
php_error(E_CORE_WARNING,"%s: Unable to initialize module",module_entry->name);
- dlclose(handle);
+ DL_UNLOAD(handle);
RETURN_FALSE;
}
}
@@ -143,7 +143,7 @@
if (module_entry->request_startup_func) {
if (module_entry->request_startup_func(type, module_entry->module_number ELS_CC)) {
php_error(E_CORE_WARNING,"%s: Unable to initialize module",module_entry->name);
- dlclose(handle);
+ DL_UNLOAD(handle);
RETURN_FALSE;
}
}
Index: php4/ext/standard/exec.c
diff -u php4/ext/standard/exec.c:1.21 php4/ext/standard/exec.c:1.22
--- php4/ext/standard/exec.c:1.21 Fri Dec 31 17:31:51 1999
+++ php4/ext/standard/exec.c Thu Feb 10 11:41:19 2000
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.21 2000/01/01 01:31:51 sas Exp $ */
+/* $Id: exec.c,v 1.22 2000/02/10 19:41:19 zeev Exp $ */
#include <stdio.h>
#include "php.h"
@@ -145,27 +145,8 @@
if (type == 1) {
-#if APACHE
- SLS_FETCH();
-#endif
-
if (output) PUTS(buf);
-#if APACHE
-# if MODULE_MAGIC_NUMBER > 19970110
- if (output) rflush(((request_rec *) SG(server_context)));
-# else
- if (output) bflush(((request_rec *) SG(server_context))->connection->client);
-# endif
-#endif
-#if CGI_BINARY
- fflush(stdout);
-#endif
-#if FHTTPD
- /* fhttpd doesn't flush */
-#endif
-#if USE_SAPI
- sapi_rqst->flush(sapi_rqst->scid);
-#endif
+ sapi_flush();
}
else if (type == 2) {
/* strip trailing whitespaces */
Index: php4/ext/standard/head.c
diff -u php4/ext/standard/head.c:1.27 php4/ext/standard/head.c:1.28
--- php4/ext/standard/head.c:1.27 Sun Feb 6 06:36:27 2000
+++ php4/ext/standard/head.c Thu Feb 10 11:41:19 2000
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: head.c,v 1.27 2000/02/06 14:36:27 thies Exp $ */
+/* $Id: head.c,v 1.28 2000/02/10 19:41:19 zeev Exp $ */
#include <stdio.h>
#include "php.h"
@@ -58,133 +58,10 @@
}
-#if 0
-/* Adds header information */
void php4i_add_header_information(char *header_information, uint header_length)
{
- char *r;
-#if APACHE
- char *rr = NULL;
- char *temp = NULL;
- long myuid = 0L;
- char temp2[32];
- request_rec *req;
- SLS_FETCH();
-
- req = ((request_rec *) SG(server_context));
-#endif
-
- if (php_header_printed == 1) {
-#if DEBUG
- php_error(E_WARNING, "Cannot add more header information - the header was already sent
"
- "(header information may be added only before any output is generated from the script
- "
- "check for text or whitespace outside PHP tags, or calls to functions that output
text)");
-#endif
- return; /* too late, already sent */
- }
-#if APACHE
- /*
- * Not entirely sure this is the right way to support the header
- * command in the Apache module. Comments?
- */
- r = strchr(header_information, ':');
- if (r) {
- *r = '\0';
- if (!strcasecmp(header_information, "Content-type")) {
- if (*(r + 1) == ' ')
- req->content_type = pstrdup(req->pool,r + 2);
- else
- req->content_type = pstrdup(req->pool,r + 1);
- cont_type = (char *) req->content_type;
- } else {
- if (*(r + 1) == ' ') {
- rr = r + 2;
- } else {
- rr = r + 1;
- }
- if (PG(safe_mode) && (!strcasecmp(header_information, "WWW-authenticate"))) {
- myuid = php_getuid();
- sprintf(temp2, "realm=\"%ld ", myuid); /* SAFE */
- temp = php_reg_replace("realm=\"", temp2, rr, 1, 0);
- if (!strcmp(temp, rr)) {
- sprintf(temp2, "realm=%ld", myuid); /* SAFE */
- temp = php_reg_replace("realm=", temp2, rr, 1, 0);
- if (!strcmp(temp, rr)) {
- sprintf(temp2, " realm=%ld", myuid); /* SAFE */
- temp = php_reg_replace("$", temp2, rr, 0, 0);
- }
- }
- table_set(req->headers_out, header_information, temp);
- } else
- table_set(req->headers_out, header_information, rr);
- }
- if (!strcasecmp(header_information, "location")) {
- req->status = REDIRECT;
- }
- *r = ':';
- php_header_printed = 2;
- }
- if (!strncasecmp(header_information, "http/", 5)) {
- if (strlen(header_information) > 9) {
- req->status = atoi(&((header_information)[9]));
- }
- /* Use a pstrdup here to get the memory straight from Apache's per-request pool to
- * avoid having our own memory manager complain about this memory not being freed
- * because it really shouldn't be freed until the end of the request and it isn't
- * easy for us to figure out when we allocated it vs. when something else might have.
- */
- req->status_line = pstrdup(req->pool,&((header_information)[9]));
- }
-#else
- r = strchr(header_information, ':');
- if (r) {
- *r = '\0';
- if (!strcasecmp(header_information, "Content-type")) {
- if (cont_type) efree(cont_type);
- cont_type = estrdup(r + 1);
-#if 0 /*WIN32|WINNT / *M$ does us again*/
- if (!strcmp(cont_type," text/html")){
- *r=':';
- PUTS_H(header_information);
- PUTS_H("\015\012");
- }
-#endif
- } else {
- *r = ':';
-#if USE_SAPI
- {
- char *tempstr=emalloc(strlen(header_information)+2);
-
- sprintf(tempstr,"%s\015\012",tempstr);
- sapi_rqst->header(sapi_rqst->scid,tempstr);
- efree(tempstr);
- }
-#else
- PUTS_H(header_information);
- PUTS_H("\015\012");
-#endif
- }
- } else {
-#if USE_SAPI
- {
- char *tempstr=emalloc(strlen(header_information)+2);
- sprintf(tempstr,"%s\015\012",tempstr);
- sapi_rqst->header(sapi_rqst->scid,tempstr);
- efree(tempstr);
- }
-#else
- PUTS_H(header_information);
- PUTS_H("\015\012");
-#endif
- }
-#endif
-}
-#else
-void php4i_add_header_information(char *header_information, uint header_length)
-{
sapi_add_header(header_information, header_length);
}
-#endif
/* Implementation of the language Header() function */
Index: php4/ext/standard/mail.c
diff -u php4/ext/standard/mail.c:1.15 php4/ext/standard/mail.c:1.16
--- php4/ext/standard/mail.c:1.15 Fri Dec 31 17:31:52 1999
+++ php4/ext/standard/mail.c Thu Feb 10 11:41:19 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mail.c,v 1.15 2000/01/01 01:31:52 sas Exp $ */
+/* $Id: mail.c,v 1.16 2000/02/10 19:41:19 zeev Exp $ */
#include <stdlib.h>
#include <ctype.h>
@@ -27,12 +27,6 @@
#endif
#include "php_mail.h"
#include "php_ini.h"
-
-#if APACHE
-# ifndef DEBUG
-# undef palloc
-# endif
-#endif
#if HAVE_SENDMAIL
#if MSVC5
Index: php4/ext/standard/php_string.h
diff -u php4/ext/standard/php_string.h:1.9 php4/ext/standard/php_string.h:1.10
--- php4/ext/standard/php_string.h:1.9 Tue Feb 8 14:21:43 2000
+++ php4/ext/standard/php_string.h Thu Feb 10 11:41:19 2000
@@ -29,7 +29,7 @@
*/
-/* $Id: php_string.h,v 1.9 2000/02/08 22:21:43 zeev Exp $ */
+/* $Id: php_string.h,v 1.10 2000/02/10 19:41:19 zeev Exp $ */
/* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
@@ -83,26 +83,31 @@
PHP_FUNCTION(str_repeat);
PHP_FUNCTION(substr_replace);
-extern PHPAPI char *php_strtoupper(char *s, size_t len);
-extern PHPAPI char *php_strtolower(char *s, size_t len);
-extern PHPAPI char *php_strtr(char *str, int len, char *str_from, char *str_to, int trlen);
-extern PHPAPI char *php_addslashes(char *str, int length, int *new_length, int freeit);
-extern PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what,
int wlength);
-extern PHPAPI void php_stripslashes(char *str, int *len);
-extern PHPAPI void php_stripcslashes(char *str, int *len);
-extern PHPAPI void php_dirname(char *str, int len);
-extern PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len);
-extern PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
+PHPAPI char *php_strtoupper(char *s, size_t len);
+PHPAPI char *php_strtolower(char *s, size_t len);
+PHPAPI char *php_strtr(char *str, int len, char *str_from, char *str_to, int trlen);
+PHPAPI char *php_addslashes(char *str, int length, int *new_length, int freeit);
+PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int
wlength);
+PHPAPI void php_stripslashes(char *str, int *len);
+PHPAPI void php_stripcslashes(char *str, int *len);
+PHPAPI void php_dirname(char *str, int len);
+PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len);
+PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
int needle_len, char *str, int str_len, int *_new_length);
-extern PHPAPI void php_trim(pval *str, pval *return_value, int mode);
-extern PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allow_len);
+PHPAPI void php_trim(pval *str, pval *return_value, int mode);
+PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allow_len);
-extern PHPAPI void php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval
*result);
+PHPAPI void php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result);
-extern PHPAPI void php_implode(pval *delim, pval *arr, pval *return_value);
-extern PHPAPI void php_explode(pval *delim, pval *str, pval *return_value);
-extern PHPAPI inline char *php_memnstr(char *haystack, char *needle, int needle_len, char *end);
-extern PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end);
-extern PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end);
+PHPAPI void php_implode(pval *delim, pval *arr, pval *return_value);
+PHPAPI void php_explode(pval *delim, pval *str, pval *return_value);
+PHPAPI inline char *php_memnstr(char *haystack, char *needle, int needle_len, char *end);
+PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end);
+PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end);
+
+#ifndef HAVE_STRERROR
+PHPAPI char *php_strerror(int errnum);
+#define strerror php_strerror
+#endif
#endif /* _PHPSTRING_H */
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.93 php4/ext/standard/string.c:1.94
--- php4/ext/standard/string.c:1.93 Tue Feb 8 14:21:43 2000
+++ php4/ext/standard/string.c Thu Feb 10 11:41:19 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.93 2000/02/08 22:21:43 zeev Exp $ */
+/* $Id: string.c,v 1.94 2000/02/10 19:41:19 zeev Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -1503,8 +1503,7 @@
/* }}} */
#ifndef HAVE_STRERROR
-#if !APACHE
-char *strerror(int errnum)
+char *php_strerror(int errnum)
{
extern int sys_nerr;
extern char *sys_errlist[];
@@ -1514,7 +1513,6 @@
(void)sprintf(BG(str_ebuf), "Unknown error: %d", errnum);
return(BG(str_ebuf));
}
-#endif
#endif
PHPAPI void php_stripcslashes(char *str, int *len)
Index: php4/ext/standard/url.c
diff -u php4/ext/standard/url.c:1.19 php4/ext/standard/url.c:1.20
--- php4/ext/standard/url.c:1.19 Tue Feb 8 14:21:43 2000
+++ php4/ext/standard/url.c Thu Feb 10 11:41:19 2000
@@ -15,7 +15,7 @@
| Author: Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.19 2000/02/08 22:21:43 zeev Exp $ */
+/* $Id: url.c,v 1.20 2000/02/10 19:41:19 zeev Exp $ */
#include <stdlib.h>
#include <string.h>
@@ -27,7 +27,7 @@
#include "url.h"
#ifdef _OSD_POSIX
#ifndef APACHE
-#error On this EBCDIC platform, PHP3 is only supported as an Apache module.
+#error On this EBCDIC platform, PHP is only supported as an Apache module.
#else /*APACHE*/
#ifndef CHARSET_EBCDIC
#define CHARSET_EBCDIC /* this machine uses EBCDIC, not ASCII! */
Index: php4/sapi/apache/config.m4
diff -u php4/sapi/apache/config.m4:1.19 php4/sapi/apache/config.m4:1.20
--- php4/sapi/apache/config.m4:1.19 Tue Feb 1 22:09:00 2000
+++ php4/sapi/apache/config.m4 Thu Feb 10 11:41:20 2000
@@ -36,7 +36,6 @@
PHP_APXS_BROKEN=yes
fi
STRONGHOLD=
- AC_DEFINE(APACHE)
AC_DEFINE(HAVE_AP_CONFIG_H)
AC_DEFINE(HAVE_AP_COMPAT_H)
AC_MSG_RESULT(yes)
@@ -66,7 +65,6 @@
PHP_SAPI=apache
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES
$APACHE_TARGET"
PHP_LIBS="-L. -lphp3"
- AC_DEFINE(APACHE)
AC_MSG_RESULT(yes - Apache 1.2.x)
STRONGHOLD=
if test -f $withval/src/ap_config.h; then
@@ -84,7 +82,6 @@
PHP_SAPI=apache
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp
$APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl
$APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir
$APACHE_TARGET/Makefile.libdir"
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
- AC_DEFINE(APACHE)
AC_MSG_RESULT(yes - Apache 2.0.X)
STRONGHOLD=
if test -f $withval/src/include/ap_config.h; then
@@ -111,7 +108,6 @@
PHP_SAPI=apache
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp
$APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl
$APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir
$APACHE_TARGET/Makefile.libdir"
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
- AC_DEFINE(APACHE)
AC_MSG_RESULT(yes - Apache 1.3.x)
STRONGHOLD=
if test -f $withval/src/include/ap_config.h; then
@@ -141,7 +137,6 @@
PHP_SAPI=apache
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp
$APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl
$APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir
$APACHE_TARGET/Makefile.libdir"
- AC_DEFINE(APACHE)
AC_MSG_RESULT(yes - Apache 1.3.x)
STRONGHOLD=
if test -f $withval/src/include/ap_config.h; then
@@ -165,7 +160,6 @@
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp
$APACHE_INSTALL_FILES $APACHE_TARGET"
STRONGHOLD=-DSTRONGHOLD=1
- AC_DEFINE(APACHE)
AC_MSG_RESULT(yes - StrongHold)
if test -f $withval/apache/ap_config.h; then
AC_DEFINE(HAVE_AP_CONFIG_H)
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.29 php4/sapi/apache/mod_php4.c:1.30
--- php4/sapi/apache/mod_php4.c:1.29 Thu Feb 10 11:29:21 2000
+++ php4/sapi/apache/mod_php4.c Thu Feb 10 11:41:20 2000
@@ -17,11 +17,12 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.29 2000/02/10 19:29:21 zeev Exp $ */
+/* $Id: mod_php4.c,v 1.30 2000/02/10 19:41:20 zeev Exp $ */
#include "zend.h"
#include "php.h"
#include "php_variables.h"
+#include "SAPI.h"
#include "httpd.h"
#include "http_config.h"
@@ -299,6 +300,7 @@
block_alarms();
register_cleanup(((request_rec *) SG(server_context))->pool, NULL, php_request_shutdown,
php_request_shutdown_for_exec);
unblock_alarms();
+ return SUCCESS;
}
@@ -310,9 +312,7 @@
static char *php_apache_getenv(char *name, int name_len SLS_DC)
{
- char *value;
-
- return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name));
+ return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name);
}
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.1 php4/sapi/apache/php_apache.c:1.2
--- php4/sapi/apache/php_apache.c:1.1 Wed Feb 2 06:29:27 2000
+++ php4/sapi/apache/php_apache.c Thu Feb 10 11:41:20 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.1 2000/02/02 14:29:27 andrei Exp $ */
+/* $Id: php_apache.c,v 1.2 2000/02/10 19:41:20 zeev Exp $ */
#include "php.h"
#include "ext/standard/head.h"
#include "php_globals.h"
@@ -35,7 +35,7 @@
#include <errno.h>
#include <ctype.h>
-#if APACHE
+#include "remains.h"
#include "http_request.h"
#include "build-defs.h"
@@ -438,8 +438,6 @@
RETVAL_LONG(ap_run_sub_req(rr));
ap_destroy_sub_req(rr);
}
-#endif
-
#endif
/*
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.25 php4/sapi/cgi/cgi_main.c:1.26
--- php4/sapi/cgi/cgi_main.c:1.25 Thu Feb 10 10:44:32 2000
+++ php4/sapi/cgi/cgi_main.c Thu Feb 10 11:41:20 2000
@@ -25,8 +25,6 @@
#include "SAPI.h"
-#if CGI_BINARY
-
#include <stdio.h>
#include "php.h"
#ifdef MSVC5
@@ -138,7 +136,7 @@
char *val;
int l=0;
- sn = request_info.script_name;
+ sn = getenv("SCRIPT_NAME");
pi = SG(request_info).request_uri;
if (sn)
l += strlen(sn);
@@ -574,5 +572,3 @@
return SUCCESS;
}
-
-#endif