Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* Plenty of thread safety and Win32 work.

* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL.
* Switched to using the DLL runtime library under Win32.  PHP will NOT work if
  compiled against the static library!
* Removed yesterday's php4libts project (with php4dllts, it's obsolete).

This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also
dependant on the thread-unsafe DLL.
  • Loading branch information...
commit 7942eaf38138ef8751a447dadb930a129528fb6b 1 parent 050cb7c
Zeev Suraski zsuraski authored
66 cgi_main.c
@@ -45,6 +45,7 @@
45 45 #include "zend_highlight.h"
46 46 #include "zend_indent.h"
47 47
  48 +
48 49 #if USE_SAPI
49 50 #include "serverapi/sapi.h"
50 51 void *gLock;
@@ -57,12 +58,14 @@ struct sapi_request_info *sapi_rqst;
57 58 #include "getopt.h"
58 59 #endif
59 60
60   -extern char *php3_ini_path;
  61 +PHPAPI extern char *php3_ini_path;
61 62
62 63 #define PHP_MODE_STANDARD 1
63 64 #define PHP_MODE_HIGHLIGHT 2
64 65 #define PHP_MODE_INDENT 3
65 66
  67 +PHPAPI extern char *optarg;
  68 +PHPAPI extern int optind;
66 69
67 70
68 71 static int zend_cgibin_ub_write(const char *str, uint str_length)
@@ -71,11 +74,40 @@ static int zend_cgibin_ub_write(const char *str, uint str_length)
71 74 }
72 75
73 76
74   -sapi_functions_struct sapi_functions = {
  77 +static sapi_functions_struct sapi_functions = {
75 78 zend_cgibin_ub_write
76 79 };
77 80
78 81
  82 +static void php_cgi_usage(char *argv0)
  83 +{
  84 + char *prog;
  85 +
  86 + prog = strrchr(argv0, '/');
  87 + if (prog) {
  88 + prog++;
  89 + } else {
  90 + prog = "php";
  91 + }
  92 +
  93 + php3_printf("Usage: %s [-q] [-h]"
  94 + " [-s]"
  95 + " [-v] [-i] [-f <file>] | "
  96 + "{<file> [args...]}\n"
  97 + " -q Quiet-mode. Suppress HTTP Header output.\n"
  98 + " -s Display colour syntax highlighted source.\n"
  99 + " -f<file> Parse <file>. Implies `-q'\n"
  100 + " -v Version number\n"
  101 + " -c<path> Look for php3.ini file in this directory\n"
  102 +#if SUPPORT_INTERACTIVE
  103 + " -a Run interactively\n"
  104 +#endif
  105 + " -e Generate extended information for debugger/profiler\n"
  106 + " -i PHP information\n"
  107 + " -h This help\n", prog);
  108 +}
  109 +
  110 +
79 111 int main(int argc, char *argv[])
80 112 {
81 113 int cgi = 0, c, i, len;
@@ -144,7 +176,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
144 176 #endif /* FORCE_CGI_REDIRECT */
145 177 }
146 178
147   - if (php3_module_startup()==FAILURE) {
  179 + if (php_module_startup(&sapi_functions)==FAILURE) {
148 180 return FAILURE;
149 181 }
150 182 #ifdef ZTS
@@ -161,8 +193,8 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
161 193 switch (c) {
162 194 case 'f':
163 195 if (!_cgi_started){
164   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
165   - php3_module_shutdown();
  196 + if (php_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
  197 + php_module_shutdown();
166 198 return FAILURE;
167 199 }
168 200 }
@@ -174,8 +206,8 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
174 206 break;
175 207 case 'v':
176 208 if (!_cgi_started) {
177   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
178   - php3_module_shutdown();
  209 + if (php_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
  210 + php_module_shutdown();
179 211 return FAILURE;
180 212 }
181 213 }
@@ -184,8 +216,8 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
184 216 break;
185 217 case 'i':
186 218 if (!_cgi_started) {
187   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
188   - php3_module_shutdown();
  219 + if (php_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
  220 + php_module_shutdown();
189 221 return FAILURE;
190 222 }
191 223 }
@@ -218,7 +250,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
218 250 case '?':
219 251 php3_noheader();
220 252 zend_output_startup();
221   - _php3_usage(argv[0]);
  253 + php_cgi_usage(argv[0]);
222 254 exit(1);
223 255 break;
224 256 default:
@@ -232,8 +264,8 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
232 264 #endif
233 265
234 266 if (!_cgi_started) {
235   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
236   - php3_module_shutdown();
  267 + if (php_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
  268 + php_module_shutdown();
237 269 return FAILURE;
238 270 }
239 271 }
@@ -286,8 +318,8 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
286 318 }
287 319 }
288 320 #endif
289   - php3_request_shutdown((void *) 0);
290   - php3_module_shutdown();
  321 + php_request_shutdown((void *) 0);
  322 + php_module_shutdown();
291 323 return FAILURE;
292 324 } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) {
293 325 /* #!php support */
@@ -304,7 +336,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
304 336
305 337 switch (behavior) {
306 338 case PHP_MODE_STANDARD:
307   - php3_parse(&file_handle CLS_CC ELS_CC PLS_CC);
  339 + php_execute_script(&file_handle CLS_CC ELS_CC PLS_CC);
308 340 break;
309 341 case PHP_MODE_HIGHLIGHT: {
310 342 zend_syntax_highlighter_ini syntax_highlighter_ini;
@@ -326,7 +358,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
326 358 }
327 359
328 360 php3_header(); /* Make sure headers have been sent */
329   - php3_request_shutdown((void *) 0);
330   - php3_module_shutdown();
  361 + php_request_shutdown((void *) 0);
  362 + php_module_shutdown();
331 363 return SUCCESS;
332 364 }
2  ext/standard/basic_functions.c
@@ -1752,7 +1752,7 @@ PHP_FUNCTION(register_shutdown_function)
1752 1752 /* }}} */
1753 1753
1754 1754
1755   -void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini)
  1755 +ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini)
1756 1756 {
1757 1757 syntax_highlighter_ini->highlight_comment = INI_STR("highlight_comment");
1758 1758 syntax_highlighter_ini->highlight_default = INI_STR("highlight_default");
2  ext/standard/basic_functions.h
@@ -102,7 +102,7 @@ extern void php3_call_user_method(INTERNAL_FUNCTION_PARAMETERS);
102 102 PHP_FUNCTION(register_shutdown_function);
103 103 PHP_FUNCTION(highlight_file);
104 104 PHP_FUNCTION(highlight_string);
105   -void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
  105 +ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
106 106
107 107 PHP_FUNCTION(ob_start);
108 108 PHP_FUNCTION(ob_end_flush);
4 ext/standard/datetime.c
@@ -61,11 +61,9 @@ char *day_short_names[] =
61 61 "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
62 62 };
63 63
64   -#ifndef HAVE_TM_ZONE
65   -#ifndef _TIMEZONE
  64 +#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !(WIN32||WINNT)
66 65 extern time_t timezone;
67 66 #endif
68   -#endif
69 67
70 68 static int phpday_tab[2][12] =
71 69 {
3  ext/standard/head.c
@@ -67,7 +67,8 @@ int php3_init_head(INIT_FUNC_ARGS)
67 67 return SUCCESS;
68 68 }
69 69
70   -void php3_noheader(void)
  70 +
  71 +PHPAPI void php3_noheader(void)
71 72 {
72 73 php3_PrintHeader = 0;
73 74 header_called = 1;
7 ext/standard/head.h
@@ -58,9 +58,8 @@ extern void php3_SetCookie(INTERNAL_FUNCTION_PARAMETERS);
58 58
59 59 void php4i_add_header_information(char *header_information);
60 60
61   -extern void php3_noheader(void);
62   -extern PHPAPI int php3_header(void);
63   -extern void php3_noheader(void);
64   -extern int php3_headers_unsent(void);
  61 +PHPAPI void php3_noheader(void);
  62 +PHPAPI int php3_header(void);
  63 +int php3_headers_unsent(void);
65 64
66 65 #endif
4 ext/standard/info.c
@@ -53,8 +53,6 @@
53 53 #define PHP3_CONF_LONG(directive,value1,value2) \
54 54 php3_printf("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">%s</td><td bgcolor=\"" CONTENTS_COLOR "\">%ld</td><td bgcolor=\"" CONTENTS_COLOR "\">%ld</td></tr>\n",directive,value1,value2);
55 55
56   -extern char **environ;
57   -
58 56 #define SECTION(name) PUTS("<hr><h2>" name "</h2>\n")
59 57
60 58 #define ENTRY_NAME_COLOR "#999999"
@@ -76,7 +74,7 @@ static int _display_module_info(php3_module_entry *module)
76 74 }
77 75
78 76
79   -void _php3_info(void)
  77 +PHPAPI void _php3_info(void)
80 78 {
81 79 char **env,*tmp1,*tmp2;
82 80 char *php3_uname;
2  ext/standard/info.h
@@ -35,6 +35,6 @@
35 35 extern void php3_version(INTERNAL_FUNCTION_PARAMETERS);
36 36 extern void php3_info(INTERNAL_FUNCTION_PARAMETERS);
37 37
38   -extern void _php3_info(void);
  38 +PHPAPI void _php3_info(void);
39 39
40 40 #endif /* _INFO_H */
2  ext/standard/post.c
@@ -393,7 +393,7 @@ void php3_treat_data(int arg, char *str)
393 393 }
394 394
395 395
396   -void php3_TreatHeaders(void)
  396 +PHPAPI void php3_TreatHeaders(void)
397 397 {
398 398 #if APACHE
399 399 #if MODULE_MAGIC_NUMBER > 19961007
6 ext/standard/post.h
@@ -36,8 +36,8 @@
36 36 #define PARSE_COOKIE 2
37 37 #define PARSE_STRING 3
38 38
39   -extern void php3_treat_data(int arg, char *str);
40   -extern void php3_TreatHeaders(void);
41   -extern void _php3_parse_gpc_data(char *, char *, pval *track_vars_array);
  39 +void php3_treat_data(int arg, char *str);
  40 +void _php3_parse_gpc_data(char *, char *, pval *track_vars_array);
  41 +PHPAPI void php3_TreatHeaders(void);
42 42
43 43 #endif
11 getopt.c
@@ -12,10 +12,10 @@
12 12 #define OPTERRARG (3)
13 13
14 14
15   -char *optarg;
16   -int optind = 1;
17   -int opterr = 1;
18   -int optopt;
  15 +PHPAPI char *optarg;
  16 +PHPAPI int optind = 1;
  17 +static int opterr = 1;
  18 +static int optopt;
19 19
20 20 static int
21 21 optiserr(int argc, char * const *argv, int oint, const char *optstr,
@@ -44,8 +44,7 @@ optiserr(int argc, char * const *argv, int oint, const char *optstr,
44 44 return('?');
45 45 }
46 46
47   -int
48   -getopt(int argc, char* const *argv, const char *optstr)
  47 +PHPAPI int getopt(int argc, char* const *argv, const char *optstr)
49 48 {
50 49 static int optchr = 0;
51 50 static int dash = 0; /* have already seen the - */
6 getopt.h
... ... @@ -1,9 +1,9 @@
1 1 /* Borrowed from Apache NT Port */
2 2 #include "php.h"
3 3
4   -extern char *optarg;
5   -extern int optind;
  4 +PHPAPI extern char *optarg;
  5 +PHPAPI extern int optind;
6 6 extern int opterr;
7 7 extern int optopt;
8 8
9   -extern int getopt(int argc, char* const *argv, const char *optstr);
  9 +PHPAPI int getopt(int argc, char* const *argv, const char *optstr);
15 main.h
@@ -37,13 +37,16 @@
37 37
38 38 #include "zend_globals.h"
39 39 #include "php_globals.h"
  40 +#include "SAPI.h"
40 41
41   -int php3_request_startup(CLS_D ELS_DC PLS_DC);
42   -extern void php3_request_shutdown(void *dummy);
43   -extern void php3_request_shutdown_for_exec(void *dummy);
44   -extern int php3_module_startup();
45   -extern void php3_module_shutdown();
46   -extern void php3_module_shutdown_for_exec(void);
  42 +PHPAPI int php_request_startup(CLS_D ELS_DC PLS_DC);
  43 +PHPAPI void php_request_shutdown(void *dummy);
  44 +PHPAPI void php_request_shutdown_for_exec(void *dummy);
  45 +PHPAPI int php_module_startup(sapi_functions_struct *sf);
  46 +PHPAPI void php_module_shutdown();
  47 +PHPAPI void php_module_shutdown_for_exec(void);
  48 +
  49 +PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC);
47 50
48 51 extern void php3_call_shutdown_functions(void);
49 52
12 main/SAPI.c
... ... @@ -1,16 +1,20 @@
1 1 #include "SAPI.h"
  2 +#ifdef ZTS
2 3 #include "TSRM.h"
  4 +#endif
3 5
4 6
5 7 #ifdef ZTS
6   -int sapi_globals_id;
  8 +SAPI_API int sapi_globals_id;
7 9 #endif
8 10
  11 +/* A true global (no need for thread safety) */
  12 +sapi_functions_struct sapi_functions;
9 13
10   -void sapi_startup()
  14 +void sapi_startup(sapi_functions_struct *sf)
11 15 {
  16 + sapi_functions = *sf;
12 17 #ifdef ZTS
13 18 sapi_globals_id = ts_allocate_id(sizeof(sapi_globals_struct), NULL, NULL);
14 19 #endif
15   -}
16   -
  20 +}
18 main/SAPI.h
... ... @@ -1,6 +1,18 @@
1 1 #ifndef _NEW_SAPI_H
2 2 #define _NEW_SAPI_H
3 3
  4 +
  5 +#if WIN32||WINNT
  6 +# ifdef SAPI_EXPORTS
  7 +# define SAPI_API __declspec(dllexport)
  8 +# else
  9 +# define SAPI_API __declspec(dllimport)
  10 +# endif
  11 +#else
  12 +#define SAPI_API
  13 +#endif
  14 +
  15 +
4 16 typedef struct {
5 17 int (*ub_write)(const char *str, unsigned int str_length);
6 18 } sapi_functions_struct;
@@ -13,7 +25,7 @@ typedef struct {
13 25 } sapi_globals_struct;
14 26
15 27
16   -void sapi_startup();
  28 +void sapi_startup(sapi_functions_struct *sf);
17 29
18 30 #ifdef ZTS
19 31 # define SLS_D sapi_globals_struct *sapi_globals
@@ -22,7 +34,7 @@ void sapi_startup();
22 34 # define SLS_CC , SLS_C
23 35 # define SG(v) (sapi_globals->v)
24 36 # define SLS_FETCH() sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id)
25   -extern int sapi_globals_id;
  37 +SAPI_API extern int sapi_globals_id;
26 38 #else
27 39 # define SLS_D
28 40 # define SLS_DC
@@ -30,7 +42,7 @@ extern int sapi_globals_id;
30 42 # define SLS_CC
31 43 # define SG(v) (sapi_globals.v)
32 44 # define SLS_FETCH()
33   -extern ZEND_API sapi_globals_struct sapi_globals;
  45 +extern SAPI_API sapi_globals_struct sapi_globals;
34 46 #endif
35 47
36 48
2  main/configuration-parser.y
@@ -60,7 +60,7 @@
60 60 static HashTable configuration_hash;
61 61 #ifndef THREAD_SAFE
62 62 extern HashTable browser_hash;
63   -extern char *php3_ini_path;
  63 +PHPAPI extern char *php3_ini_path;
64 64 #endif
65 65 static HashTable *active__php3_hash_table;
66 66 static pval *current_section;
2  main/fopen_wrappers.c
@@ -198,7 +198,7 @@ PHPAPI FILE *php3_fopen_wrapper(char *path, char *mode, int options, int *issock
198 198
199 199 #if CGI_BINARY || FHTTPD || USE_SAPI
200 200
201   -FILE *php3_fopen_for_parser(void)
  201 +PHPAPI FILE *php3_fopen_for_parser(void)
202 202 {
203 203 FILE *fp;
204 204 struct stat st;
2  main/fopen_wrappers.h
@@ -69,7 +69,7 @@ extern int wsa_fp; /* a list for open sockets */
69 69
70 70 extern PHPAPI FILE *php3_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd);
71 71
72   -extern FILE *php3_fopen_for_parser(void);
  72 +PHPAPI FILE *php3_fopen_for_parser(void);
73 73
74 74 extern PHPAPI int _php3_check_open_basedir(char *path);
75 75
363 main/main.c
@@ -93,7 +93,7 @@ struct sapi_request_info *sapi_rqst;
93 93 #ifndef ZTS
94 94 php_core_globals core_globals;
95 95 #else
96   -int core_globals_id;
  96 +PHPAPI int core_globals_id;
97 97 #endif
98 98
99 99 void _php3_build_argv(char * ELS_DC);
@@ -109,7 +109,7 @@ void *gLock; /*mutex variable */
109 109
110 110 /* True globals (no need for thread safety) */
111 111 HashTable configuration_hash;
112   -char *php3_ini_path = NULL;
  112 +PHPAPI char *php3_ini_path = NULL;
113 113 #ifdef ZTS
114 114 php_core_globals *main_core_globals=NULL;
115 115 #endif
@@ -606,36 +606,7 @@ static void php_message_handler_for_zend(long message, void *data)
606 606
607 607
608 608
609   -#ifndef NEW_SAPI
610   -# if APACHE
611   -static int zend_apache_ub_write(const char *str, uint str_length)
612   -{
613   - if (php3_rqst) {
614   - return rwrite(str, str_length, php3_rqst);
615   - } else {
616   - return fwrite(str, 1, str_length, stdout);
617   - }
618   -}
619   -
620   -sapi_functions_struct sapi_functions = {
621   - zend_apache_ub_write
622   -};
623   -
624   -# elif CGI_BINARY
625   -
626   -static int zend_cgibin_ub_write(const char *str, uint str_length)
627   -{
628   - return fwrite(str, 1, str_length, stdout);
629   -}
630   -
631   -sapi_functions_struct sapi_functions = {
632   - zend_cgibin_ub_write
633   -};
634   -# endif
635   -#endif
636   -
637   -
638   -int php3_request_startup(CLS_D ELS_DC PLS_DC)
  609 +int php_request_startup(CLS_D ELS_DC PLS_DC)
639 610 {
640 611 zend_output_startup();
641 612
@@ -651,7 +622,7 @@ int php3_request_startup(CLS_D ELS_DC PLS_DC)
651 622 * memory.
652 623 */
653 624 block_alarms();
654   - register_cleanup(php3_rqst->pool, NULL, php3_request_shutdown, php3_request_shutdown_for_exec);
  625 + register_cleanup(php3_rqst->pool, NULL, php_request_shutdown, php_request_shutdown_for_exec);
655 626 unblock_alarms();
656 627 #endif
657 628
@@ -675,7 +646,7 @@ int php3_request_startup(CLS_D ELS_DC PLS_DC)
675 646 }
676 647
677 648
678   -void php3_request_shutdown_for_exec(void *dummy)
  649 +void php_request_shutdown_for_exec(void *dummy)
679 650 {
680 651 /* used to close fd's in the 3..255 range here, but it's problematic
681 652 */
@@ -689,7 +660,7 @@ int return_one(void *p)
689 660 }
690 661
691 662
692   -void php3_request_shutdown(void *dummy)
  663 +void php_request_shutdown(void *dummy)
693 664 {
694 665 #if FHTTPD
695 666 char tmpline[128];
@@ -791,7 +762,7 @@ static core_globals_ctor(php_core_globals *core_globals)
791 762 #endif
792 763
793 764
794   -int php3_module_startup()
  765 +int php_module_startup(sapi_functions_struct *sf)
795 766 {
796 767 zend_utility_functions zuf;
797 768 zend_utility_values zuv;
@@ -829,9 +800,7 @@ int php3_module_startup()
829 800 main_core_globals = core_globals;
830 801 #endif
831 802
832   -#ifdef NEW_SAPI
833   - sapi_startup();
834   -#endif
  803 + sapi_startup(sf);
835 804
836 805 #if HAVE_SETLOCALE
837 806 setlocale(LC_CTYPE, "");
@@ -870,12 +839,12 @@ int php3_module_startup()
870 839
871 840
872 841
873   -void php3_module_shutdown_for_exec(void)
  842 +void php_module_shutdown_for_exec(void)
874 843 {
875 844 /* used to close fd's in the range 3.255 here, but it's problematic */
876 845 }
877 846
878   -void php3_module_shutdown()
  847 +void php_module_shutdown()
879 848 {
880 849 int module_number=0; /* for UNREGISTER_INI_ENTRIES() */
881 850 CLS_FETCH();
@@ -1144,7 +1113,7 @@ void _php3_build_argv(char *s ELS_DC)
1144 1113
1145 1114 #include "logos.h"
1146 1115
1147   -void php3_parse(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
  1116 +PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
1148 1117 {
1149 1118 zend_file_handle *prepend_file_p, *append_file_p;
1150 1119 zend_file_handle prepend_file, append_file;
@@ -1199,304 +1168,7 @@ void php3_parse(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC)
1199 1168
1200 1169
1201 1170
1202   -#if CGI_BINARY
1203   -
1204   -void _php3_usage(char *argv0)
1205   -{
1206   - char *prog;
1207   -
1208   - prog = strrchr(argv0, '/');
1209   - if (prog) {
1210   - prog++;
1211   - } else {
1212   - prog = "php";
1213   - }
1214   -
1215   - php3_printf("Usage: %s [-q] [-h]"
1216   - " [-s]"
1217   - " [-v] [-i] [-f <file>] | "
1218   - "{<file> [args...]}\n"
1219   - " -q Quiet-mode. Suppress HTTP Header output.\n"
1220   - " -s Display colour syntax highlighted source.\n"
1221   - " -f<file> Parse <file>. Implies `-q'\n"
1222   - " -v Version number\n"
1223   - " -c<path> Look for php3.ini file in this directory\n"
1224   -#if SUPPORT_INTERACTIVE
1225   - " -a Run interactively\n"
1226   -#endif
1227   - " -e Generate extended information for debugger/profiler\n"
1228   - " -i PHP information\n"
1229   - " -h This help\n", prog);
1230   -}
1231   -
1232 1171 /* some systems are missing these from their header files */
1233   -extern char *optarg;
1234   -extern int optind;
1235   -
1236   -#if THREAD_SAFE
1237   -extern flex_globals *yy_init_tls(void);
1238   -extern void yy_destroy_tls(void);
1239   -#endif
1240   -
1241   -#ifndef ZTS
1242   -int main(int argc, char *argv[])
1243   -{
1244   - int cgi = 0, c, i, len;
1245   - zend_file_handle file_handle;
1246   - char *s;
1247   -/* temporary locals */
1248   - char *_cgi_filename=NULL;
1249   - int _cgi_started=0;
1250   - int behavior=PHP_MODE_STANDARD;
1251   -#if SUPPORT_INTERACTIVE
1252   - int interactive=0;
1253   -#endif
1254   -/* end of temporary locals */
1255   -#ifdef ZTS
1256   - zend_compiler_globals *compiler_globals;
1257   - zend_executor_globals *executor_globals;
1258   - php_core_globals *core_globals;
1259   -#endif
1260   -
1261   -
1262   -#ifndef ZTS
1263   - if (setjmp(EG(bailout))!=0) {
1264   - return -1;
1265   - }
1266   -#endif
1267   -
1268   -#if WIN32|WINNT
1269   - _fmode = _O_BINARY; /*sets default for file streams to binary */
1270   - setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
1271   - setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */
1272   - setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */
1273   -#endif
1274   -
1275   -
1276   - /* Make sure we detect we are a cgi - a bit redundancy here,
1277   - but the default case is that we have to check only the first one. */
1278   - if (getenv("SERVER_SOFTWARE")
1279   - || getenv("SERVER_NAME")
1280   - || getenv("GATEWAY_INTERFACE")
1281   - || getenv("REQUEST_METHOD")) {
1282   - cgi = 1;
1283   - if (argc > 1)
1284   - request_info.php_argv0 = strdup(argv[1]);
1285   - else request_info.php_argv0 = NULL;
1286   -#if FORCE_CGI_REDIRECT
1287   - if (!getenv("REDIRECT_STATUS")) {
1288   - PUTS("<b>Security Alert!</b> PHP CGI cannot be accessed directly.\n\
1289   -\n\
1290   -<P>This PHP CGI binary was compiled with force-cgi-redirect enabled. This\n\
1291   -means that a page will only be served up if the REDIRECT_STATUS CGI variable is\n\
1292   -set. This variable is set, for example, by Apache's Action directive redirect.\n\
1293   -<P>You may disable this restriction by recompiling the PHP binary with the\n\
1294   ---disable-force-cgi-redirect switch. If you do this and you have your PHP CGI\n\
1295   -binary accessible somewhere in your web tree, people will be able to circumvent\n\
1296   -.htaccess security by loading files through the PHP parser. A good way around\n\
1297   -this is to define doc_root in your php3.ini file to something other than your\n\
1298   -top-level DOCUMENT_ROOT. This way you can separate the part of your web space\n\n\
1299   -which uses PHP from the normal part using .htaccess security. If you do not have\n\
1300   -any .htaccess restrictions anywhere on your site you can leave doc_root undefined.\n\
1301   -\n");
1302   -
1303   - /* remove that detailed explanation some time */
1304   -
1305   - return FAILURE;
1306   - }
1307   -#endif /* FORCE_CGI_REDIRECT */
1308   - }
1309   -
1310   - if (php3_module_startup()==FAILURE) {
1311   - return FAILURE;
1312   - }
1313   -#ifdef ZTS
1314   - compiler_globals = ts_resource(compiler_globals_id);
1315   - executor_globals = ts_resource(executor_globals_id);
1316   - core_globals = ts_resource(core_globals_id);
1317   -#endif
1318   -
1319   - CG(extended_info) = 0;
1320   -
1321   - if (!cgi) { /* never execute the arguments if you are a CGI */
1322   - request_info.php_argv0 = NULL;
1323   - while ((c = getopt(argc, argv, "c:qvisnaeh?vf:")) != -1) {
1324   - switch (c) {
1325   - case 'f':
1326   - if (!_cgi_started){
1327   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
1328   - php3_module_shutdown();
1329   - return FAILURE;
1330   - }
1331   - }
1332   - _cgi_started=1;
1333   - _cgi_filename = estrdup(optarg);
1334   - /* break missing intentionally */
1335   - case 'q':
1336   - php3_noheader();
1337   - break;
1338   - case 'v':
1339   - if (!_cgi_started) {
1340   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
1341   - php3_module_shutdown();
1342   - return FAILURE;
1343   - }
1344   - }
1345   - php3_printf("%s\n", PHP_VERSION);
1346   - exit(1);
1347   - break;
1348   - case 'i':
1349   - if (!_cgi_started) {
1350   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
1351   - php3_module_shutdown();
1352   - return FAILURE;
1353   - }
1354   - }
1355   - _cgi_started=1;
1356   - php3_TreatHeaders();
1357   - _php3_info();
1358   - exit(1);
1359   - break;
1360   - case 's':
1361   - behavior=PHP_MODE_HIGHLIGHT;
1362   - break;
1363   - case 'n':
1364   - behavior=PHP_MODE_INDENT;
1365   - break;
1366   - case 'c':
1367   - php3_ini_path = strdup(optarg); /* intentional leak */
1368   - break;
1369   - case 'a':
1370   -#if SUPPORT_INTERACTIVE
1371   - printf("Interactive mode enabled\n\n");
1372   - interactive=1;
1373   -#else
1374   - printf("Interactive mode not supported!\n\n");
1375   -#endif
1376   - break;
1377   - case 'e':
1378   - CG(extended_info) = 1;
1379   - break;
1380   - case 'h':
1381   - case '?':
1382   - php3_noheader();
1383   - zend_output_startup();
1384   - _php3_usage(argv[0]);
1385   - exit(1);
1386   - break;
1387   - default:
1388   - break;
1389   - }
1390   - }
1391   - } /* not cgi */
1392   -
1393   -#if SUPPORT_INTERACTIVE
1394   - EG(interactive) = interactive;
1395   -#endif
1396   -
1397   - if (!_cgi_started) {
1398   - if (php3_request_startup(CLS_C ELS_CC PLS_CC)==FAILURE) {
1399   - php3_module_shutdown();
1400   - return FAILURE;
1401   - }
1402   - }
1403   - file_handle.filename = "-";
1404   - file_handle.type = ZEND_HANDLE_FP;
1405   - file_handle.handle.fp = stdin;
1406   - if (_cgi_filename) {
1407   - request_info.filename = _cgi_filename;
1408   - }
1409   -
1410   - php3_TreatHeaders();
1411   -
1412   - if (!cgi) {
1413   - if (!request_info.query_string) {
1414   - for (i = optind, len = 0; i < argc; i++)
1415   - len += strlen(argv[i]) + 1;
1416   -
1417   - s = malloc(len + 1); /* leak - but only for command line version, so ok */
1418   - *s = '\0'; /* we are pretending it came from the environment */
1419   - for (i = optind, len = 0; i < argc; i++) {
1420   - strcat(s, argv[i]);
1421   - if (i < (argc - 1))
1422   - strcat(s, "+");
1423   - }
1424   - request_info.query_string = s;
1425   - }
1426   - if (!request_info.filename && argc > optind)
1427   - request_info.filename = argv[optind];
1428   - }
1429   - /* If for some reason the CGI interface is not setting the
1430   - PATH_TRANSLATED correctly, request_info.filename is NULL.
1431   - We still call php3_fopen_for_parser, because if you set doc_root
1432   - or user_dir configuration directives, PATH_INFO is used to construct
1433   - the filename as a side effect of php3_fopen_for_parser.
1434   - */
1435   - if (cgi || request_info.filename) {
1436   - file_handle.filename = request_info.filename;
1437   - file_handle.handle.fp = php3_fopen_for_parser();
1438   - }
1439   -
1440   - if (cgi && !file_handle.handle.fp) {
1441   - PUTS("No input file specified.\n");
1442   -#if 0 /* this is here for debuging under windows */
1443   - if (argc) {
1444   - i = 0;
1445   - php3_printf("\nargc %d\n",argc);
1446   - while (i <= argc) {
1447   - php3_printf("%s\n",argv[i]);
1448   - i++;
1449   - }
1450   - }
1451   -#endif
1452   - php3_request_shutdown((void *) 0);
1453   - php3_module_shutdown();
1454   - return FAILURE;
1455   - } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) {
1456   - /* #!php support */
1457   - c = fgetc(file_handle.handle.fp);
1458   - if (c == '#') {
1459   - while (c != 10 && c != 13) {
1460   - c = fgetc(file_handle.handle.fp); /* skip to end of line */
1461   - }
1462   - CG(zend_lineno)++;
1463   - } else {
1464   - rewind(file_handle.handle.fp);
1465   - }
1466   - }
1467   -
1468   - switch (behavior) {
1469   - case PHP_MODE_STANDARD:
1470   - php3_parse(&file_handle CLS_CC ELS_CC PLS_CC);
1471   - break;
1472   - case PHP_MODE_HIGHLIGHT: {
1473   - zend_syntax_highlighter_ini syntax_highlighter_ini;
1474   -
1475   - if (open_file_for_scanning(&file_handle CLS_CC)==SUCCESS) {
1476   - php_get_highlight_struct(&syntax_highlighter_ini);
1477   - zend_highlight(&syntax_highlighter_ini);
1478   - fclose(file_handle.handle.fp);
1479   - }
1480   - return 0;
1481   - }
1482   - break;
1483   - case PHP_MODE_INDENT:
1484   - open_file_for_scanning(&file_handle CLS_CC);
1485   - zend_indent();
1486   - fclose(file_handle.handle.fp);
1487   - return 0;
1488   - break;
1489   - }
1490   -
1491   - php3_header(); /* Make sure headers have been sent */
1492   - php3_request_shutdown((void *) 0);
1493   - php3_module_shutdown();
1494   - return SUCCESS;
1495   -}
1496   -#endif /* CGI_BINARY */
1497   -
1498   -#endif /* ZTS */
1499   -
1500 1172
1501 1173 #if APACHE
1502 1174 PHPAPI int apache_php3_module_main(request_rec * r, int fd, int display_source_mode)
@@ -1513,14 +1185,14 @@ PHPAPI int apache_php3_module_main(request_rec * r, int fd, int display_source_m
1513 1185
1514 1186 php3_rqst = r;
1515 1187
1516   - if (php3_request_startup(CLS_C ELS_CC PLS_CC) == FAILURE) {
  1188 + if (php_request_startup(CLS_C ELS_CC PLS_CC) == FAILURE) {
1517 1189 return FAILURE;
1518 1190 }
1519 1191 php3_TreatHeaders();
1520 1192 file_handle.type = ZEND_HANDLE_FD;
1521 1193 file_handle.handle.fd = fd;
1522 1194 file_handle.filename = request_info.filename;
1523   - (void) php3_parse(&file_handle CLS_CC ELS_CC);
  1195 + (void) php_execute_script(&file_handle CLS_CC ELS_CC);
1524 1196
1525 1197 php3_header(); /* Make sure headers have been sent */
1526 1198 zend_end_ob_buffering(1);
@@ -1528,6 +1200,15 @@ PHPAPI int apache_php3_module_main(request_rec * r, int fd, int display_source_m
1528 1200 }
1529 1201 #endif /* APACHE */
1530 1202
  1203 +
  1204 +#if WIN32||WINNT
  1205 +/* just so that this symbol gets exported... */
  1206 +PHPAPI void dummy_indent()
  1207 +{
  1208 + zend_indent();
  1209 +}
  1210 +#endif
  1211 +
1531 1212 /*
1532 1213 * Local variables:
1533 1214 * tab-width: 4
21 main/php.h
@@ -69,15 +69,15 @@ extern unsigned char second_arg_allow_ref[];
69 69 #if WIN32
70 70 #include "config.w32.h"
71 71 #include "win95nt.h"
72   -# if defined(COMPILE_DL)
73   -# define PHPAPI __declspec(dllimport)
74   -# else
75   -# define PHPAPI __declspec(dllexport)
76   -# endif
  72 +# ifdef PHP_EXPORTS
  73 +# define PHPAPI __declspec(dllexport)
  74 +# else
  75 +# define PHPAPI __declspec(dllimport)
  76 +# endif
77 77 #else
78   -# include "config.h"
79   -# define PHPAPI
80   -# define THREAD_LS
  78 +#include "config.h"
  79 +#define PHPAPI
  80 +#define THREAD_LS
81 81 #endif
82 82
83 83
@@ -314,12 +314,11 @@ extern PHPAPI int php3_fhttpd_write(char *a,int n);
314 314
315 315
316 316 /* global variables */
317   -#ifndef THREAD_SAFE
318 317 extern pval *data;
319   -#if (!PHP_ISAPI)
  318 +#if !(WIN32||WINNT)
320 319 extern char **environ;
321 320 #endif
322   -#endif
  321 +
323 322 extern PHPAPI int le_index_ptr; /* list entry type for index pointers */
324 323
325 324 extern void phperror(char *error);
2  main/php_globals.h
@@ -12,7 +12,7 @@ typedef struct _php_core_globals php_core_globals;
12 12 # define PLS_CC , PLS_C
13 13 # define PG(v) (core_globals->v)
14 14 # define PLS_FETCH() php_core_globals *core_globals = ts_resource(core_globals_id)
15   -extern int core_globals_id;
  15 +PHPAPI extern int core_globals_id;
16 16 #else
17 17 # define PLS_D
18 18 # define PLS_DC
89 mod_php3.c
@@ -87,68 +87,10 @@ int saved_umask;
87 87 php_apache_info_struct php_apache_info; /* active config */
88 88
89 89 int apache_php3_module_main(request_rec * r, int fd, int display_source_mode);
90   -extern int php3_module_startup();
91   -extern void php3_module_shutdown();
92   -extern void php3_module_shutdown_for_exec();
  90 +int php_module_startup(sapi_functions_struct *sf);
  91 +void php_module_shutdown();
  92 +void php_module_shutdown_for_exec();
93 93
94   -extern int tls_create(void);
95   -extern int tls_destroy(void);
96   -extern int tls_startup(void);
97   -extern int tls_shutdown(void);
98   -
99   -#if WIN32|WINNT
100   -
101   -/*
102   - we will want to change this to the apache api
103   - process and thread entry and exit functions
104   -*/
105   -BOOL WINAPI DllMain(HANDLE hModule,
106   - DWORD ul_reason_for_call,
107   - LPVOID lpReserved)
108   -{
109   - switch( ul_reason_for_call ) {
110   - case DLL_PROCESS_ATTACH:
111   - /*
112   - I should be loading ini vars here
113   - and doing whatever true global inits
114   - need to be done
115   - */
116   - if (!tls_startup())
117   - return 0;
118   - if (!tls_create())
119   - return 0;
120   -
121   - break;
122   - case DLL_THREAD_ATTACH:
123   - if (!tls_create())
124   - return 0;
125   - /* if (php3_module_startup()==FAILURE) {
126   - return FAILURE;
127   - }
128   -*/ break;
129   - case DLL_THREAD_DETACH:
130   - if (!tls_destroy())
131   - return 0;
132   -/* if (initialized) {
133   - php3_module_shutdown();
134   - return SUCCESS;
135   - } else {
136   - return FAILURE;
137   - }
138   -*/ break;
139   - case DLL_PROCESS_DETACH:
140   - /*
141   - close down anything down in process_attach
142   - */
143   - if (!tls_destroy())
144   - return 0;
145   - if (!tls_shutdown())
146   - return 0;
147   - break;
148   - }
149   - return 1;
150   -}
151   -#endif
152 94
153 95 void php3_save_umask()
154 96 {
@@ -156,11 +98,28 @@ void php3_save_umask()
156 98 umask(saved_umask);
157 99 }
158 100
  101 +
  102 +static int zend_apache_ub_write(const char *str, uint str_length)
  103 +{
  104 + if (php3_rqst) {
  105 + return rwrite(str, str_length, php3_rqst);
  106 + } else {
  107 + return fwrite(str, 1, str_length, stdout);
  108 + }
  109 +}
  110 +
  111 +
  112 +sapi_functions_struct sapi_functions = {
  113 + zend_apache_ub_write
  114 +};
  115 +
  116 +
159 117 void php3_restore_umask()
160 118 {
161 119 umask(saved_umask);
162 120 }
163 121
  122 +
164 123 int send_php3(request_rec *r, int display_source_mode, char *filename)
165 124 {
166 125 int fd, retval;
@@ -230,16 +189,19 @@ int send_php3(request_rec *r, int display_source_mode, char *filename)
230 189 return OK;
231 190 }
232 191
  192 +
233 193 int send_parsed_php3(request_rec * r)
234 194 {
235 195 return send_php3(r, 0, NULL);
236 196 }
237 197
  198 +
238 199 int send_parsed_php3_source(request_rec * r)
239 200 {
240 201 return send_php3(r, 0, NULL);
241 202 }
242 203
  204 +
243 205 /*
244 206 * Create the per-directory config structure with defaults
245 207 */
@@ -299,10 +261,11 @@ int php3_xbithack_handler(request_rec * r)
299 261 return send_parsed_php3(r);
300 262 }
301 263
  264 +
302 265 void php3_init_handler(server_rec *s, pool *p)
303 266 {
304   - register_cleanup(p, NULL, php3_module_shutdown, php3_module_shutdown_for_exec);
305   - php3_module_startup();
  267 + register_cleanup(p, NULL, php_module_shutdown, php_module_shutdown_for_exec);
  268 + php_module_startup(&sapi_functions);
306 269 #if MODULE_MAGIC_NUMBER >= 19980527
307 270 ap_add_version_component("PHP/" PHP_VERSION);
308 271 #endif
2  output.c
@@ -43,7 +43,7 @@ static int header_request;
43 43 * Main
44 44 */
45 45
46   -void zend_output_startup()
  46 +PHPAPI void zend_output_startup()
47 47 {
48 48 ob_buffer = NULL;
49 49 zend_body_write = zend_ub_body_write;
2  output.h
@@ -3,7 +3,7 @@
3 3
4 4 #include "php.h"
5 5
6   -void zend_output_startup();
  6 +PHPAPI void zend_output_startup();
7 7
8 8 /* exported output functions */
9 9 int (*zend_body_write)(const char *str, uint str_length); /* string output */
602 php4.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
42 42 # PROP Ignore_Export_Lib 0
43 43 # PROP Target_Dir ""
44 44 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45   -# ADD CPP /nologo /MT /W3 /GX /O2 /I "include" /I "..\libzend" /I "." /I "regex\\" /I "d:\src\bind\include" /D "NDEBUG" /D "MSVC5" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "COMPILE_LIBZEND" /Fr /FD /c
  45 +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\libzend" /I "." /I "regex\\" /I "..\bindlib" /D "NDEBUG" /D "MSVC5" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /Fr /FD /c
46 46 # SUBTRACT CPP /YX /Yc /Yu
47 47 # ADD BASE RSC /l 0x409 /d "NDEBUG"
48 48 # ADD RSC /l 0x409 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
51 51 # ADD BSC32 /nologo
52 52 LINK32=link.exe
53 53 # 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 /nologo /subsystem:console /machine:I386
54   -# ADD LINK32 lib44bsd95.lib resolv.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:3.0 /subsystem:console /machine:I386 /out:"Release\php.exe" /libpath:"lib" /libpath:"\src\lib" /libpath:"d:\src\bind\lib" /libpath:"..\libzend\Release"
  54 +# ADD LINK32 php4nts.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:3.0 /subsystem:console /machine:I386 /nodefaultlib:"libc.lib" /out:"Release\php.exe" /libpath:"Release"
55 55
56 56 !ELSEIF "$(CFG)" == "php4 - Win32 Debug"
57 57
@@ -67,7 +67,7 @@ LINK32=link.exe
67 67 # PROP Ignore_Export_Lib 0
68 68 # PROP Target_Dir ""
69 69 # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
70   -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "include" /I "..\libzend" /I "." /I "regex\\" /I "d:\src\bind\include" /D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "COMPILE_LIBZEND" /FR /FD /c
  70 +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\libzend" /I "." /I "regex\\" /I "..\bindlib" /D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /FR /FD /c
71 71 # SUBTRACT CPP /YX
72 72 # ADD BASE RSC /l 0x409 /d "_DEBUG"
73 73 # ADD RSC /l 0x409 /i "c:\include" /d "_DEBUG"
@@ -76,7 +76,7 @@ BSC32=bscmake.exe
76 76 # ADD BSC32 /nologo
77 77 LINK32=link.exe
78 78 # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
79   -# ADD LINK32 lib44bsd95.lib resolv.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 libzend.lib /nologo /version:3.0 /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libcd" /out:"Debug\php.exe" /pdbtype:sept /libpath:"lib" /libpath:"\src\lib" /libpath:"d:\src\bind\lib" /libpath:"..\libzend\Debug"
  79 +# ADD LINK32 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.lib /nologo /version:3.0 /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd" /nodefaultlib:"libcmt" /out:"Debug\php.exe" /pdbtype:sept /libpath:"Debug"
80 80 # SUBTRACT LINK32 /pdb:none
81 81
82 82 !ENDIF
@@ -85,605 +85,17 @@ LINK32=link.exe
85 85
86 86 # Name "php4 - Win32 Release"
87 87 # Name "php4 - Win32 Debug"
88   -# Begin Group "Core"
89   -
90   -# PROP Default_Filter ""
91 88 # Begin Group "Source Files"
92 89
93   -# PROP Default_Filter ""
94   -# Begin Source File
95   -
96   -SOURCE=".\configuration-parser.c"
97   -# End Source File
98   -# Begin Source File
99   -
100   -SOURCE=".\configuration-scanner.c"
101   -# End Source File
102   -# Begin Source File
103   -
104   -SOURCE=.\ext\standard\cyr_convert.c
105   -# End Source File
106   -# Begin Source File
107   -
108   -SOURCE=".\fopen-wrappers.c"
109   -# End Source File
110   -# Begin Source File
111   -
112   -SOURCE=.\getopt.c
113   -# End Source File
114   -# Begin Source File
115   -
116   -SOURCE=.\internal_functions.c
117   -# End Source File
118   -# Begin Source File
119   -
120   -SOURCE=.\main.c
121   -# End Source File
122   -# Begin Source File
123   -
124   -SOURCE=.\output.c
125   -# End Source File
126   -# Begin Source File
127   -
128   -SOURCE=.\php3_realpath.c
129   -# End Source File
130   -# Begin Source File
131   -
132   -SOURCE=.\php_ini.c
133   -# End Source File
134   -# Begin Source File
135   -
136   -SOURCE=.\ext\standard\quot_print.c
137   -# End Source File
  90 +# PROP Default_Filter ".c"
138 91 # Begin Source File
139 92
140   -SOURCE=.\request_info.c
141   -# End Source File
142   -# Begin Source File
143   -
144   -SOURCE=.\safe_mode.c
  93 +SOURCE=.\cgi_main.c
145 94 # End Source File
146 95 # End Group
147 96 # Begin Group "Header Files"
148 97
149   -# PROP Default_Filter ""
150   -# Begin Source File
151   -
152   -SOURCE=.\config.w32.h
153   -# End Source File