]> granicus.if.org Git - php/commitdiff
- Complete the move to the new INI parser. (Side effect: at last, people
authorZeev Suraski <zeev@php.net>
Mon, 30 Oct 2000 23:39:14 +0000 (23:39 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 30 Oct 2000 23:39:14 +0000 (23:39 +0000)
  can finally have spaces and tabs in their extension statements...)

12 files changed:
ext/standard/basic_functions.c
ext/standard/browscap.c
main/Makefile.in
main/configuration-parser.y [deleted file]
main/configuration-scanner.l [deleted file]
main/php_ini.c
main/php_ini.h
main/php_main.h
win32/php4.dsp
win32/php4.dsw
win32/php4dll.dsp
win32/php4dllts.dsp

index 1477cbbc2048d831fe7fdbbadbb986923b99560e..a952c8576aad73fff6c94bac2ce993f0c9cfc6e1 100644 (file)
@@ -2402,14 +2402,15 @@ PHP_FUNCTION(parse_ini_file)
        }
 
        convert_to_string_ex(filename);
-       fh.handle.fp = V_FOPEN((*filename)->value.str.val, "r");
+       fh.handle.fp = V_FOPEN(Z_STRVAL_PP(filename), "r");
        if (!fh.handle.fp) {
                php_error(E_WARNING,"Cannot open '%s' for reading", (*filename)->value.str.val);
                return;
        }
        fh.type = ZEND_HANDLE_FP;
+       fh.filename = Z_STRVAL_PP(filename);
        array_init(return_value);
-       zend_parse_ini_file(&fh, ini_parser_cb, return_value);
+       zend_parse_ini_file(&fh, 0, ini_parser_cb, return_value);
 }
 /* }}} */
 
index 6ca27c6c1158207a7f5c6ac90ec10467bc0278f4..fcbe8e5116ebd96505a981258514ff5a4758bdfe 100644 (file)
@@ -33,7 +33,7 @@ static zval *current_section;
 
 static void browscap_entry_dtor(zval *pvalue)
 {
-       if (pvalue->type == IS_OBJECT || pvalue->type == IS_ARRAY) {
+       if (pvalue->type == IS_OBJECT) {
                zend_hash_destroy(pvalue->value.obj.properties);
                free(pvalue->value.obj.properties);
        }
@@ -144,7 +144,8 @@ PHP_MINIT_FUNCTION(browscap)
                        php_error(E_WARNING,"Cannot open '%s' for reading", browscap);
                        return FAILURE;
                }
-               zend_parse_ini_file(&fh, (zend_ini_parser_cb_t) php_browscap_parser_cb, &browser_hash);
+               fh.filename = browscap;
+               zend_parse_ini_file(&fh, 1, (zend_ini_parser_cb_t) php_browscap_parser_cb, &browser_hash);
        }
 
        return SUCCESS;
index 89bf0c41d09ff5596eea1ae24b28f85f5da98c81..0c83137408e997154b6ef105a3664be6c6fe6e89 100644 (file)
@@ -2,7 +2,6 @@ LTLIBRARY_NAME = libmain.la
 
 LTLIBRARY_SOURCES = \
        main.c internal_functions.c snprintf.c php_sprintf.c \
-       configuration-parser.c configuration-scanner.c \
        safe_mode.c fopen-wrappers.c alloca.c \
        php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
        strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
@@ -10,11 +9,6 @@ LTLIBRARY_SOURCES = \
 
 include $(top_srcdir)/build/ltlib.mk
 
-configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
-       $(YACC) -p cfg -v -d $< -o configuration-parser.c
-
-configuration-scanner.c: $(srcdir)/configuration-scanner.l
-       $(LEX) -Pcfg -o$@ -i $<
 
 internal_functions.c: $(srcdir)/internal_functions.c.in $(top_builddir)/config.status
        cd $(top_builddir) && \
diff --git a/main/configuration-parser.y b/main/configuration-parser.y
deleted file mode 100644 (file)
index b9b281a..0000000
+++ /dev/null
@@ -1,432 +0,0 @@
-%{
-/*
-   +----------------------------------------------------------------------+
-   | PHP version 4.0                                                      |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997, 1998, 1999, 2000 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.               |
-   +----------------------------------------------------------------------+
-   | Authors: Zeev Suraski <zeev@zend.com>                                |
-   +----------------------------------------------------------------------+
- */
-
-
-
-/* $Id$ */
-
-#define DEBUG_CFG_PARSER 0
-#include "php.h"
-#include "php_globals.h"
-#include "php_ini.h"
-#include "ext/standard/dl.h"
-#include "ext/standard/file.h"
-#include "zend_extensions.h"
-
-
-#if WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <winbase.h>
-#include "win32/wfile.h"
-#endif
-
-#define YYSTYPE zval
-
-#define PARSING_MODE_CFG               0
-#define PARSING_MODE_STANDALONE        2
-
-static HashTable configuration_hash;
-PHPAPI extern char *php_ini_path;
-static HashTable *active_hash_table;
-static char *currently_parsed_filename;
-
-static int parsing_mode;
-
-zval yylval;
-
-extern int cfglex(zval *cfglval);
-extern FILE *cfgin;
-extern int cfglineno;
-extern void init_cfg_scanner(void);
-
-zval *cfg_get_entry(char *name, uint name_length)
-{
-       zval *tmp;
-
-       if (zend_hash_find(&configuration_hash, name, name_length, (void **) &tmp)==SUCCESS) {
-               return tmp;
-       } else {
-               return NULL;
-       }
-}
-
-
-PHPAPI int cfg_get_long(char *varname,long *result)
-{
-       zval *tmp,var;
-       
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
-               *result=(long)NULL;
-               return FAILURE;
-       }
-       var = *tmp;
-       zval_copy_ctor(&var);
-       convert_to_long(&var);
-       *result = var.value.lval;
-       return SUCCESS;
-}
-
-
-PHPAPI int cfg_get_double(char *varname,double *result)
-{
-       zval *tmp,var;
-       
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
-               *result=(double)0;
-               return FAILURE;
-       }
-       var = *tmp;
-       zval_copy_ctor(&var);
-       convert_to_double(&var);
-       *result = var.value.dval;
-       return SUCCESS;
-}
-
-
-PHPAPI int cfg_get_string(char *varname, char **result)
-{
-       zval *tmp;
-
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
-               *result=NULL;
-               return FAILURE;
-       }
-       *result = tmp->value.str.val;
-       return SUCCESS;
-}
-
-
-static void yyerror(char *str)
-{
-       char *error_buf;
-       int error_buf_len;
-
-       error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */
-       error_buf = (char *) emalloc(error_buf_len);
-       
-       sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, cfglineno);
-#ifdef PHP_WIN32
-       MessageBox(NULL, error_buf, "PHP Error", MB_OK|MB_TOPMOST|0x00200000L);
-#else
-       fprintf(stderr, "PHP:  %s", error_buf);
-#endif
-       efree(error_buf);
-}
-
-
-static void pvalue_config_destructor(zval *pvalue)
-{   
-    if (pvalue->type == IS_STRING && pvalue->value.str.val != empty_string) {
-        free(pvalue->value.str.val);
-    }
-}
-
-
-int php_init_config(void)
-{
-       PLS_FETCH();
-
-       if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1)==FAILURE) {
-               return FAILURE;
-       }
-
-#if USE_CONFIG_FILE
-       {
-               char *env_location,*default_location,*php_ini_search_path;
-               int safe_mode_state = PG(safe_mode);
-               char *open_basedir = PG(open_basedir);
-               char *opened_path;
-               int free_default_location=0;
-               
-               env_location = getenv("PHPRC");
-               if (!env_location) {
-                       env_location="";
-               }
-#ifdef PHP_WIN32
-               {
-                       if (php_ini_path) {
-                               default_location = php_ini_path;
-                       } else {
-                               default_location = (char *) malloc(512);
-                       
-                               if (!GetWindowsDirectory(default_location,255)) {
-                                       default_location[0]=0;
-                               }
-                               free_default_location=1;
-                       }
-               }
-#else
-               if (!php_ini_path) {
-                       default_location = CONFIGURATION_FILE_PATH;
-               } else {
-                       default_location = php_ini_path;
-               }
-#endif
-
-/* build a path */
-               php_ini_search_path = (char *) malloc(sizeof(".")+strlen(env_location)+strlen(default_location)+2+1);
-
-               if (!php_ini_path) {
-#ifdef PHP_WIN32
-                       sprintf(php_ini_search_path,".;%s;%s",env_location,default_location);
-#else
-                       sprintf(php_ini_search_path,".:%s:%s",env_location,default_location);
-#endif
-               } else {
-                       /* if path was set via -c flag, only look there */
-                       strcpy(php_ini_search_path,default_location);
-               }
-               PG(safe_mode) = 0;
-               PG(open_basedir) = NULL;
-               cfgin = php_fopen_with_path("php.ini","r",php_ini_search_path,&opened_path);
-               free(php_ini_search_path);
-               if (free_default_location) {
-                       free(default_location);
-               }
-               PG(safe_mode) = safe_mode_state;
-               PG(open_basedir) = open_basedir;
-
-               if (!cfgin) {
-                       return SUCCESS;  /* having no configuration file is ok */
-               }
-
-               if (opened_path) {
-                       zval tmp;
-                       
-                       tmp.value.str.val = strdup(opened_path);
-                       tmp.value.str.len = strlen(opened_path);
-                       tmp.type = IS_STRING;
-                       zend_hash_update(&configuration_hash,"cfg_file_path",sizeof("cfg_file_path"),(void *) &tmp,sizeof(zval),NULL);
-#if DEBUG_CFG_PARSER
-                       php_printf("INI file opened at '%s'\n",opened_path);
-#endif
-                       efree(opened_path);
-               }
-                       
-               init_cfg_scanner();
-               active_hash_table = &configuration_hash;
-               parsing_mode = PARSING_MODE_CFG;
-               currently_parsed_filename = "php.ini";
-               yyparse();
-               fclose(cfgin);
-       }
-       
-#endif
-       
-       return SUCCESS;
-}
-
-
-int php_shutdown_config(void)
-{
-       zend_hash_destroy(&configuration_hash);
-       return SUCCESS;
-}
-
-
-void do_cfg_op(char type, zval *result, zval *op1, zval *op2)
-{
-       int i_result;
-       int i_op1, i_op2;
-       char str_result[MAX_LENGTH_OF_LONG];
-
-       i_op1 = atoi(op1->value.str.val);
-       free(op1->value.str.val);
-       if (op2) {
-               i_op2 = atoi(op2->value.str.val);
-               free(op2->value.str.val);
-       } else {
-               i_op2 = 0;
-       }
-
-       switch (type) {
-               case '|':
-                       i_result = i_op1 | i_op2;
-                       break;
-               case '&':
-                       i_result = i_op1 & i_op2;
-                       break;
-               case '~':
-                       i_result = ~i_op1;
-                       break;
-               case '!':
-                       i_result = !i_op1;
-                       break;
-               default:
-                       i_result = 0;
-                       break;
-       }
-
-       result->value.str.len = zend_sprintf(str_result, "%d", i_result);
-       result->value.str.val = (char *) malloc(result->value.str.len+1);
-       memcpy(result->value.str.val, str_result, result->value.str.len);
-       result->value.str.val[result->value.str.len] = 0;
-       result->type = IS_STRING;
-}
-
-
-void do_cfg_get_constant(zval *result, zval *name)
-{
-       zval z_constant;
-
-       if (zend_get_constant(name->value.str.val, name->value.str.len, &z_constant)) {
-               /* z_constant is emalloc()'d */
-               convert_to_string(&z_constant);
-               result->value.str.val = zend_strndup(z_constant.value.str.val, z_constant.value.str.len);
-               result->value.str.len = z_constant.value.str.len;
-               result->type = z_constant.type;
-               zval_dtor(&z_constant);
-               free(name->value.str.val);      
-       } else {
-               *result = *name;
-       }
-}
-
-
-%}
-
-%pure_parser
-%token TC_STRING
-%token TC_ENCAPSULATED_STRING
-%token SECTION
-%token CFG_TRUE
-%token CFG_FALSE
-%token EXTENSION
-%token T_ZEND_EXTENSION
-%token T_ZEND_EXTENSION_TS
-%token T_ZEND_EXTENSION_DEBUG
-%token T_ZEND_EXTENSION_DEBUG_TS
-%left '|' '&'
-%right '~' '!'
-
-%%
-
-statement_list:
-               statement_list statement
-       |       /* empty */
-;
-
-statement:
-               TC_STRING '=' string_or_value {
-#if DEBUG_CFG_PARSER
-                       printf("'%s' = '%s'\n",$1.value.str.val,$3.value.str.val);
-#endif
-                       $3.type = IS_STRING;
-                       switch (parsing_mode) {
-                               case PARSING_MODE_CFG:
-                                       zend_hash_update(active_hash_table, $1.value.str.val, $1.value.str.len+1, &$3, sizeof(zval), NULL);
-                                       if (active_hash_table == &configuration_hash) {
-                                               zend_alter_ini_entry($1.value.str.val, $1.value.str.len+1, $3.value.str.val, $3.value.str.len+1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
-                                       }
-                                       break;
-                               case PARSING_MODE_STANDALONE: {
-                                               zval *entry;
-
-                                               MAKE_STD_ZVAL(entry);
-                                               entry->value.str.val = estrndup($3.value.str.val, $3.value.str.len);
-                                               entry->value.str.len = $3.value.str.len;
-                                               entry->type = IS_STRING;
-                                               zend_hash_update(active_hash_table, $1.value.str.val, $1.value.str.len+1, &entry, sizeof(zval *), NULL);
-                                               pvalue_config_destructor(&$3);
-                                       }
-                                       break;
-                       }               
-                       free($1.value.str.val);
-               }
-       |       TC_STRING { free($1.value.str.val); }
-       |       EXTENSION '=' cfg_string {
-                       if (parsing_mode==PARSING_MODE_CFG) {
-                               zval dummy;
-
-#if DEBUG_CFG_PARSER
-                               printf("Loading '%s'\n",$3.value.str.val);
-#endif
-                               php_dl(&$3,MODULE_PERSISTENT,&dummy);
-                       }
-               }
-       |       T_ZEND_EXTENSION '=' cfg_string {
-                       if (parsing_mode==PARSING_MODE_CFG) {
-#if !defined(ZTS) && !ZEND_DEBUG
-                               zend_load_extension($3.value.str.val);
-#endif
-                               free($3.value.str.val);
-                       }
-               }
-       |       T_ZEND_EXTENSION_TS '=' cfg_string { 
-                       if (parsing_mode==PARSING_MODE_CFG) {
-#if defined(ZTS) && !ZEND_DEBUG
-                               zend_load_extension($3.value.str.val);
-#endif
-                               free($3.value.str.val);
-                       }
-               }
-       |       T_ZEND_EXTENSION_DEBUG '=' cfg_string { 
-                       if (parsing_mode==PARSING_MODE_CFG) {
-#if !defined(ZTS) && ZEND_DEBUG
-                               zend_load_extension($3.value.str.val);
-#endif
-                               free($3.value.str.val);
-                       }
-               }
-       |       T_ZEND_EXTENSION_DEBUG_TS '=' cfg_string { 
-                       if (parsing_mode==PARSING_MODE_CFG) {
-#if defined(ZTS) && ZEND_DEBUG
-                               zend_load_extension($3.value.str.val);
-#endif
-                               free($3.value.str.val);
-                       }
-               }
-       |       SECTION { free($1.value.str.val); }
-       |       '\n'
-;
-
-
-cfg_string:
-               TC_STRING { $$ = $1; }
-       |       TC_ENCAPSULATED_STRING { $$ = $1; }
-;
-
-string_or_value:
-               expr { $$ = $1; }
-       |       TC_ENCAPSULATED_STRING { $$ = $1; }
-       |       CFG_TRUE { $$ = $1; }
-       |       CFG_FALSE { $$ = $1; }
-       |       '\n' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
-       |       '\0' { $$.value.str.val = strdup(""); $$.value.str.len=0; $$.type = IS_STRING; }
-;
-
-expr:
-               constant_string                 { $$ = $1; }
-       |       expr '|' expr                   { do_cfg_op('|', &$$, &$1, &$3); }
-       |       expr '&' expr                   { do_cfg_op('&', &$$, &$1, &$3); }
-       |       '~' expr                                { do_cfg_op('~', &$$, &$2, NULL); }
-       |       '!'     expr                            { do_cfg_op('!', &$$, &$2, NULL); }
-       |       '(' expr ')'                    { $$ = $2; }
-;
-
-constant_string:
-               TC_STRING { do_cfg_get_constant(&$$, &$1); }
-;
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
diff --git a/main/configuration-scanner.l b/main/configuration-scanner.l
deleted file mode 100644 (file)
index 4e90739..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-%{
-
-/*
-   +----------------------------------------------------------------------+
-   | PHP version 4.0                                                      |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997, 1998, 1999, 2000 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.               |
-   +----------------------------------------------------------------------+
-   | Authors:  Zeev Suraski <zeev@zend.com>                               |
-   +----------------------------------------------------------------------+
-*/
-
-
-#include "php.h"
-#include "configuration-parser.h"
-
-#undef YYSTYPE
-#define YYSTYPE pval
-
-#define YY_DECL cfglex(pval *cfglval)
-
-
-void init_cfg_scanner()
-{
-       cfglineno=1;
-}
-
-
-%}
-
-%option noyywrap
-%option yylineno
-
-%%
-
-<INITIAL>"extension" {
-#if    0
-       printf("found extension\n");
-#endif
-       return EXTENSION;
-}
-
-
-<INITIAL>"zend_extension" {
-       return T_ZEND_EXTENSION;
-}
-
-
-<INITIAL>"zend_extension_ts" {
-       return T_ZEND_EXTENSION_TS;
-}
-
-
-<INITIAL>"zend_extension_debug" {
-       return T_ZEND_EXTENSION_DEBUG;
-}
-
-
-<INITIAL>"zend_extension_debug_ts" {
-       return T_ZEND_EXTENSION_DEBUG_TS;
-}
-
-
-<INITIAL>[ ]*("true"|"on"|"yes")[ ]* {
-       cfglval->value.str.val = zend_strndup("1",1);
-       cfglval->value.str.len = 1;
-       cfglval->type = IS_STRING;
-       return CFG_TRUE;
-}
-
-
-<INITIAL>[ ]*("false"|"off"|"no"|"none")[ ]* {
-       cfglval->value.str.val = zend_strndup("",0);
-       cfglval->value.str.len = 0;
-       cfglval->type = IS_STRING;
-       return CFG_FALSE;
-}
-
-<INITIAL>[[][^[]+[\]]([\n]?|"\r\n"?) {
-       /* SECTION */
-
-       /* eat trailng ] */
-       while (yyleng>0 && (yytext[yyleng-1]=='\n' || yytext[yyleng-1]=='\r' || yytext[yyleng-1]==']')) {
-               yyleng--;
-               yytext[yyleng]=0;
-       }
-
-       /* eat leading [ */
-       yytext++;
-       yyleng--;
-
-       cfglval->value.str.val = zend_strndup(yytext,yyleng);
-       cfglval->value.str.len = yyleng;
-       cfglval->type = IS_STRING;
-       return SECTION;
-}
-
-
-<INITIAL>["][^\n\r"]*["] {
-       /* ENCAPSULATED TC_STRING */
-
-       /* eat trailing " */
-       yytext[yyleng-1]=0;
-       
-       /* eat leading " */
-       yytext++;
-
-       cfglval->value.str.val = zend_strndup(yytext, yyleng - 2);
-       cfglval->value.str.len = yyleng - 2;
-       cfglval->type = IS_STRING;
-       return TC_ENCAPSULATED_STRING;
-}
-
-<INITIAL>[&|~()!] {
-       return yytext[0];
-}
-
-
-<INITIAL>[^=\n\r\t;|&~()!"]+ {
-       /* STRING */
-       register int i;
-
-       /* eat trailing whitespace */
-       for (i=yyleng-1; i>=0; i--) {
-               if (yytext[i]==' ' || yytext[i]=='\t') {
-                       yytext[i]=0;
-                       yyleng--;
-               } else {
-                       break;
-               }
-       }
-       /* eat leading whitespace */
-       while (yytext[0]) {
-               if (yytext[0]==' ' || yytext[0]=='\t') {
-                       yytext++;
-                       yyleng--;
-               } else {
-                       break;
-               }
-       }
-       if (yyleng!=0) {
-               cfglval->value.str.val = zend_strndup(yytext,yyleng);
-               cfglval->value.str.len = yyleng;
-               cfglval->type = IS_STRING;
-               return TC_STRING;
-       } else {
-               /* whitespace */
-       }
-}
-
-
-
-<INITIAL>[=\n] {
-       return yytext[0];
-}
-
-<INITIAL>"\r\n" {
-       return '\n';
-}
-
-<INITIAL>[;][^\r\n]*[\r\n]? {
-       /* comment */
-       return '\n';
-}
-
-<INITIAL>[ \t] {
-       /* eat whitespace */
-}
-
-<INITIAL>. {
-#if DEBUG
-       php_error(E_NOTICE,"Unexpected character on line %d:  '%s' (ASCII %d)\n",yylineno,yytext,yytext[0]);
-#endif
-}
index 1c52a384e5271a0bb50d402274cc1f444cb89b8d..21afeb54e1bf3d5ba888ba998ce266ef09a44e8f 100644 (file)
 #include "php.h"
 #include "ext/standard/info.h"
 #include "zend_ini.h"
+#include "php_ini.h"
+#include "ext/standard/dl.h"
+#include "zend_extensions.h"
+
+static HashTable configuration_hash;
+PHPAPI extern char *php_ini_path;
 
 
 static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
@@ -83,3 +89,215 @@ PHPAPI void display_ini_entries(zend_module_entry *module)
        php_info_print_table_end();
 }
 
+
+
+/* php.ini support */
+
+#ifdef ZTS
+# if (ZEND_DEBUG)
+# define ZEND_EXTENSION_TOKEN  "zend_extension_debug_ts"
+# else
+# define ZEND_EXTENSION_TOKEN  "zend_extension_ts"
+# endif
+#else
+# if (ZEND_DEBUG)
+# define ZEND_EXTENSION_TOKEN  "zend_extension_debug"
+# else
+# define ZEND_EXTENSION_TOKEN  "zend_extension"
+# endif
+#endif
+
+
+static void pvalue_config_destructor(zval *pvalue)
+{   
+    if (pvalue->type == IS_STRING && pvalue->value.str.val != empty_string) {
+        free(pvalue->value.str.val);
+    }
+}
+
+
+static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg)
+{
+       switch (callback_type) {
+               case ZEND_INI_PARSER_ENTRY: {
+                               zval *entry;
+
+                               if (!arg2) {
+                                       break;
+                               }
+                               if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */
+                                       zval dummy;
+
+                                       php_dl(arg2, MODULE_PERSISTENT, &dummy);
+                               } else if (!strcasecmp(Z_STRVAL_P(arg1), ZEND_EXTENSION_TOKEN)) { /* load Zend extension */
+                                       zend_load_extension(Z_STRVAL_P(arg2));
+                               } else {
+                                       zend_hash_update(&configuration_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, arg2, sizeof(zval), (void **) &entry);
+                                       Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry));
+                                       php_alter_ini_entry(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, Z_STRVAL_P(arg2), Z_STRLEN_P(arg2)+1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
+                               }
+                       }
+                       break;
+               case ZEND_INI_PARSER_SECTION:
+                       break;
+       }
+}
+
+
+int php_init_config(void)
+{
+       PLS_FETCH();
+
+       if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1)==FAILURE) {
+               return FAILURE;
+       }
+
+#if USE_CONFIG_FILE
+       {
+               char *env_location,*default_location,*php_ini_search_path;
+               int safe_mode_state = PG(safe_mode);
+               char *open_basedir = PG(open_basedir);
+               char *opened_path;
+               int free_default_location=0;
+               zend_file_handle fh;
+               
+               env_location = getenv("PHPRC");
+               if (!env_location) {
+                       env_location="";
+               }
+#ifdef PHP_WIN32
+               {
+                       if (php_ini_path) {
+                               default_location = php_ini_path;
+                       } else {
+                               default_location = (char *) malloc(512);
+                       
+                               if (!GetWindowsDirectory(default_location,255)) {
+                                       default_location[0]=0;
+                               }
+                               free_default_location=1;
+                       }
+               }
+#else
+               if (!php_ini_path) {
+                       default_location = CONFIGURATION_FILE_PATH;
+               } else {
+                       default_location = php_ini_path;
+               }
+#endif
+
+/* build a path */
+               php_ini_search_path = (char *) malloc(sizeof(".")+strlen(env_location)+strlen(default_location)+2+1);
+
+               if (!php_ini_path) {
+#ifdef PHP_WIN32
+                       sprintf(php_ini_search_path,".;%s;%s",env_location,default_location);
+#else
+                       sprintf(php_ini_search_path,".:%s:%s",env_location,default_location);
+#endif
+               } else {
+                       /* if path was set via -c flag, only look there */
+                       strcpy(php_ini_search_path,default_location);
+               }
+               PG(safe_mode) = 0;
+               PG(open_basedir) = NULL;
+
+               
+               fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path, &opened_path);
+               free(php_ini_search_path);
+               if (free_default_location) {
+                       free(default_location);
+               }
+               PG(safe_mode) = safe_mode_state;
+               PG(open_basedir) = open_basedir;
+
+               if (!fh.handle.fp) {
+                       return SUCCESS;  /* having no configuration file is ok */
+               }
+               fh.type = ZEND_HANDLE_FP;
+               fh.filename = opened_path;
+
+               zend_parse_ini_file(&fh, 1, php_config_ini_parser_cb, NULL);
+
+               if (opened_path) {
+                       zval tmp;
+                       
+                       tmp.value.str.val = strdup(opened_path);
+                       tmp.value.str.len = strlen(opened_path);
+                       tmp.type = IS_STRING;
+                       zend_hash_update(&configuration_hash,"cfg_file_path",sizeof("cfg_file_path"),(void *) &tmp,sizeof(zval),NULL);
+#if DEBUG_CFG_PARSER
+                       php_printf("INI file opened at '%s'\n",opened_path);
+#endif
+                       efree(opened_path);
+               }
+       }
+       
+#endif
+       
+       return SUCCESS;
+}
+
+
+int php_shutdown_config(void)
+{
+       zend_hash_destroy(&configuration_hash);
+       return SUCCESS;
+}
+
+
+zval *cfg_get_entry(char *name, uint name_length)
+{
+       zval *tmp;
+
+       if (zend_hash_find(&configuration_hash, name, name_length, (void **) &tmp)==SUCCESS) {
+               return tmp;
+       } else {
+               return NULL;
+       }
+}
+
+
+PHPAPI int cfg_get_long(char *varname,long *result)
+{
+       zval *tmp,var;
+       
+       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+               *result=(long)NULL;
+               return FAILURE;
+       }
+       var = *tmp;
+       zval_copy_ctor(&var);
+       convert_to_long(&var);
+       *result = var.value.lval;
+       return SUCCESS;
+}
+
+
+PHPAPI int cfg_get_double(char *varname,double *result)
+{
+       zval *tmp,var;
+       
+       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+               *result=(double)0;
+               return FAILURE;
+       }
+       var = *tmp;
+       zval_copy_ctor(&var);
+       convert_to_double(&var);
+       *result = var.value.dval;
+       return SUCCESS;
+}
+
+
+PHPAPI int cfg_get_string(char *varname, char **result)
+{
+       zval *tmp;
+
+       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+               *result=NULL;
+               return FAILURE;
+       }
+       *result = tmp->value.str.val;
+       return SUCCESS;
+}
index 0321c1fa680c59718bccf904995c8f3f9bd62fc0..cd1b2b00a63ea4495e684f4e369d0bc2d6675409 100644 (file)
@@ -21,6 +21,9 @@
 
 #include "zend_ini.h"
 
+int php_init_config(void);
+int php_shutdown_config(void);
+
 #define PHP_INI_USER   ZEND_INI_USER
 #define PHP_INI_PERDIR ZEND_INI_PERDIR
 #define PHP_INI_SYSTEM ZEND_INI_SYSTEM
index 22b1bbc8c49e1ea9d667fa01f1300936fbc62406..09ec56d0cbd3302e1f115a58e07e9bbe44ffcedb 100644 (file)
@@ -49,11 +49,6 @@ PHPAPI int php_handle_auth_data(const char *auth SLS_DC);
 
 extern void php_call_shutdown_functions(void);
 
-
-/* configuration module */
-extern int php_init_config(void);
-extern int php_shutdown_config(void);
-
 /* environment module */
 extern int php_init_environ(void);
 extern int php_shutdown_environ(void);
index c21a8d1b55fbf720b32f886f98b543c13234d535..2ac2aa056acdf9d925a0c553b9a039f9d18220a7 100644 (file)
@@ -43,7 +43,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /I "..\TSRM" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c\r
 # SUBTRACT CPP /YX /Yc /Yu\r
 # ADD BASE RSC /l 0x409 /d "NDEBUG"\r
 # ADD RSC /l 0x409 /d "NDEBUG"\r
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /D "DEBUG" /D "_DEBUG" /D "_CONSOLE" /D ZEND_DEBUG=1 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /FD /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /I "..\TSRM" /D "DEBUG" /D "_DEBUG" /D "_CONSOLE" /D ZEND_DEBUG=1 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /FD /c\r
 # SUBTRACT CPP /YX\r
 # ADD BASE RSC /l 0x409 /d "_DEBUG"\r
 # ADD RSC /l 0x409 /i "c:\include" /d "_DEBUG"\r
@@ -96,7 +96,7 @@ LINK32=link.exe
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "Zend" /I "." /I "regex\\" /I "..\bindlib_w32" /D "NDEBUG" /D "MSVC5" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /Fr /FD /c\r
 # SUBTRACT BASE CPP /YX /Yc /Yu\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex\\" /I "..\..\bindlib_w32" /I "..\TSRM" /D "NDEBUG" /D "_CONSOLE" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /Fr /FD /c\r
 # SUBTRACT CPP /YX /Yc /Yu\r
 # ADD BASE RSC /l 0x409 /d "NDEBUG"\r
 # ADD RSC /l 0x409 /d "NDEBUG"\r
index 1dd2dbe6ddd8ed050dae6859e97048cb5fcb1331..25e42c8a464f22646a6f735e8a9eb114ee03bf0f 100644 (file)
@@ -3,6 +3,18 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 \r
 ###############################################################################\r
 \r
+Project: "TSRM"=..\TSRM\TSRM.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
 Project: "Zend"=..\Zend\Zend.dsp - Package Owner=<4>\r
 \r
 Package=<5>\r
@@ -56,6 +68,9 @@ Package=<4>
     Begin Project Dependency\r
     Project_Dep_Name libmysql\r
     End Project Dependency\r
+    Begin Project Dependency\r
+    Project_Dep_Name TSRM\r
+    End Project Dependency\r
 }}}\r
 \r
 ###############################################################################\r
index ed421862d2c297e1016d9797a3173d85654285e7..dc74d8149953919d9cb52c391f3b5006771b0144 100644 (file)
@@ -44,7 +44,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "SAPI_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /I "..\TSRM" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "SAPI_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /FR /YX /FD /GZ /c\r
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
 # ADD BASE RSC /l 0x40d /d "_DEBUG"\r
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
 # 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 /dll /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Zend.lib resolv.lib libmysql.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /nodefaultlib:"libcmtd" /out:"..\Debug\php4nts_debug.dll" /pdbtype:sept /libpath:"..\TSRM\Debug" /libpath:"..\Zend\Debug" /libpath:"..\..\bindlib_w32\Debug" /libpath:"..\ext\mysql\libmysql\Debug"\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Zend.lib resolv.lib libmysql.lib TSRM.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /nodefaultlib:"libcmtd" /out:"..\Debug\php4nts_debug.dll" /pdbtype:sept /libpath:"..\TSRM\Debug_TS" /libpath:"..\Zend\Debug" /libpath:"..\..\bindlib_w32\Debug" /libpath:"..\ext\mysql\libmysql\Debug"\r
 \r
 !ELSEIF  "$(CFG)" == "php4dll - Win32 Release"\r
 \r
@@ -70,7 +70,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /YX /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLL_EXPORTS" /D "PHP_EXPORTS" /D "SAPI_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /I "..\TSRM" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLL_EXPORTS" /D "PHP_EXPORTS" /D "SAPI_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD BASE RSC /l 0x40d /d "NDEBUG"\r
@@ -97,7 +97,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "Zend" /I "." /I "regex" /I "..\bindlib_w32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "MSVC5" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "SAPI_EXPORTS" /D ZEND_DEBUG=0 /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "Zend" /I "." /I "regex" /I "..\bindlib_w32" /I "main" /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "SAPI_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "Zend" /I "." /I "regex" /I "..\bindlib_w32" /I "main" /I ".." /I "..\main" /I "..\Zend" /I "..\regex" /I "..\..\bindlib_w32" /I "..\TSRM" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "SAPI_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "MSVC5" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD BASE RSC /l 0x40d /d "NDEBUG"\r
@@ -124,14 +124,6 @@ LINK32=link.exe
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.c"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE="..\main\configuration-scanner.c"\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\cyr_convert.c\r
 # End Source File\r
 # Begin Source File\r
@@ -153,6 +145,10 @@ SOURCE=..\main\mergesort.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\main\network.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\standard\output.c\r
 # End Source File\r
 # Begin Source File\r
@@ -165,15 +161,15 @@ SOURCE=..\main\php_ini.c
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_ticks.c\r
+SOURCE=..\main\php_open_temporary_file.c\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_variables.c\r
+SOURCE=..\main\php_ticks.c\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_virtual_cwd.c\r
+SOURCE=..\main\php_variables.c\r
 # End Source File\r
 # Begin Source File\r
 \r
@@ -213,10 +209,6 @@ SOURCE=..\main\config.w32.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.h"\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\cyr_convert.h\r
 # End Source File\r
 # Begin Source File\r
@@ -261,19 +253,19 @@ SOURCE=..\main\php_ini.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_realpath.h\r
+SOURCE=..\main\php_open_temporary_file.h\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_ticks.h\r
+SOURCE=..\main\php_realpath.h\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_variables.h\r
+SOURCE=..\main\php_ticks.h\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\php_virtual_cwd.h\r
+SOURCE=..\main\php_variables.h\r
 # End Source File\r
 # Begin Source File\r
 \r
@@ -373,6 +365,10 @@ SOURCE=..\ext\standard\fsock.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\ext\standard\ftp_fopen_wrapper.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\standard\head.c\r
 # End Source File\r
 # Begin Source File\r
@@ -381,6 +377,10 @@ SOURCE=..\ext\standard\html.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\ext\standard\http_fopen_wrapper.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\standard\image.c\r
 # End Source File\r
 # Begin Source File\r
@@ -453,6 +453,10 @@ SOURCE=..\ext\standard\parsedate.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\ext\standard\php_fopen_wrapper.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\mysql\php_mysql.c\r
 # ADD CPP /I "..\ext\mysql\libmysql"\r
 # End Source File\r
@@ -521,6 +525,14 @@ SOURCE=..\ext\standard\url.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\ext\standard\url_scanner.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\standard\url_scanner_ex.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\standard\var.c\r
 # End Source File\r
 # End Group\r
@@ -609,6 +621,10 @@ SOURCE=..\ext\standard\php_filestat.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\ext\standard\php_fopen_wrappers.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\ext\ldap\php_ldap.h\r
 # End Source File\r
 # Begin Source File\r
@@ -667,6 +683,14 @@ SOURCE=..\ext\standard\uniqid.h
 \r
 SOURCE=..\ext\standard\url.h\r
 # End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\standard\url_scanner.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\standard\url_scanner_ex.h\r
+# End Source File\r
 # End Group\r
 # Begin Group "Regular Expressions"\r
 \r
@@ -887,6 +911,86 @@ SOURCE=..\ext\xml\expat\xmltok\xmltok_ns.c
 # End Group\r
 # End Group\r
 # End Group\r
+# Begin Group "FTP"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Group "Source Files No. 6"\r
+\r
+# PROP Default_Filter ".c"\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\ftp\ftp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\ftp\php_ftp.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files No. 6"\r
+\r
+# PROP Default_Filter ".h"\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\ftp\ftp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\ftp\php_ftp.h\r
+# End Source File\r
+# End Group\r
+# End Group\r
+# Begin Group "Calendar"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Group "Source Files No. 7"\r
+\r
+# PROP Default_Filter ".c"\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\cal_unix.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\calendar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\dow.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\easter.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\french.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\gregor.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\jewish.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\julian.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files No. 7"\r
+\r
+# PROP Default_Filter ".h"\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\php_calendar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\ext\calendar\sdncal.h\r
+# End Source File\r
+# End Group\r
+# End Group\r
 # End Group\r
 # Begin Group "Win32"\r
 \r
@@ -989,67 +1093,6 @@ SOURCE=..\win32\wfile.h
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.y"\r
-\r
-!IF  "$(CFG)" == "php4dll - Win32 Debug"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dll - Win32 Release"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dll - Win32 Release_inline"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\parsedate.y\r
 \r
 !IF  "$(CFG)" == "php4dll - Win32 Debug"\r
@@ -1095,46 +1138,6 @@ InputPath=..\ext\standard\parsedate.y
 # Begin Group "Scanners"\r
 \r
 # PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE="..\main\configuration-scanner.l"\r
-\r
-!IF  "$(CFG)" == "php4dll - Win32 Debug"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dll - Win32 Release"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dll - Win32 Release_inline"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
 # End Group\r
 # Begin Group "Text Files"\r
 \r
index 6d576717478ac4ba86b327d5b325a7329d51212a..4813a12c031e7f7e8ed1b2f2ed7065cd19b99e97 100644 (file)
@@ -124,14 +124,6 @@ LINK32=link.exe
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.c"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE="..\main\configuration-scanner.c"\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\cyr_convert.c\r
 # End Source File\r
 # Begin Source File\r
@@ -213,10 +205,6 @@ SOURCE=..\main\config.w32.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.h"\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\cyr_convert.h\r
 # End Source File\r
 # Begin Source File\r
@@ -237,10 +225,6 @@ SOURCE=..\main\logos.h
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\main.h\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\main\output.h\r
 # End Source File\r
 # Begin Source File\r
@@ -269,6 +253,10 @@ SOURCE=..\main\php_ini.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\main\php_main.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\main\php_open_temporary_file.h\r
 # End Source File\r
 # Begin Source File\r
@@ -1108,67 +1096,6 @@ SOURCE=..\win32\wfile.h
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
-SOURCE="..\main\configuration-parser.y"\r
-\r
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-parser.y"\r
-\r
-BuildCmds= \\r
-       cd ..\main \\r
-       if not "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p cfg configuration-parser.y \\r
-       if "X%CYGWIN%"=="X" bison --output=configuration-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p cfg configuration-parser.y \\r
-       \r
-\r
-"..\main\configuration-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-\r
-"..\main\configuration-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-   $(BuildCmds)\r
-# End Custom Build\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\ext\standard\parsedate.y\r
 \r
 !IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"\r
@@ -1214,46 +1141,6 @@ InputPath=..\ext\standard\parsedate.y
 # Begin Group "Scanners"\r
 \r
 # PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE="..\main\configuration-scanner.l"\r
-\r
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"\r
-\r
-# Begin Custom Build\r
-InputPath="..\main\configuration-scanner.l"\r
-\r
-"..\main\configuration-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
-       cd ..\main \r
-       flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l \r
-       \r
-# End Custom Build\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
 # End Group\r
 # Begin Group "Text Files"\r
 \r