[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2003-10-19 Thread changelog
changelog   Sun Oct 19 20:34:49 2003 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.319 ZendEngine2/ChangeLog:1.320
--- ZendEngine2/ChangeLog:1.319 Sat Oct 18 20:32:44 2003
+++ ZendEngine2/ChangeLog   Sun Oct 19 20:34:48 2003
@@ -1,3 +1,9 @@
+2003-10-19  Andi Gutmans  [EMAIL PROTECTED]
+
+* zend_language_parser.y:
+  - Nuke const in function parameters. I just can't remember why this exists
+  - and it seems no one else remembers either. It has no semantic meaning.
+
 2003-10-18  Marcus Boerger  [EMAIL PROTECTED]
 
 * zend.h
@@ -1811,7 +1817,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.319 2003/10/19 00:32:44 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.320 2003/10/20 00:34:48 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -3535,7 +3541,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.319 2003/10/19 00:32:44 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.320 2003/10/20 00:34:48 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /win32 php_registry.h registry.c

2003-10-19 Thread Stanislav Malyshev
stasSun Oct 19 06:22:21 2003 EDT

  Modified files:  
/php-src/win32  php_registry.h registry.c 
  Log:
  Add function for getting php.ini path from registry
  
  
Index: php-src/win32/php_registry.h
diff -u php-src/win32/php_registry.h:1.3 php-src/win32/php_registry.h:1.4
--- php-src/win32/php_registry.h:1.3Sat Aug  4 21:42:48 2001
+++ php-src/win32/php_registry.hSun Oct 19 06:22:21 2003
@@ -3,5 +3,6 @@
 
 
 void UpdateIniFromRegistry(char *path TSRMLS_DC);
+char *GetIniPathFromRegistry();
 
 #endif /* PHP_REGISTRY_H */
Index: php-src/win32/registry.c
diff -u php-src/win32/registry.c:1.12 php-src/win32/registry.c:1.13
--- php-src/win32/registry.c:1.12   Mon Oct 14 08:05:09 2002
+++ php-src/win32/registry.cSun Oct 19 06:22:21 2003
@@ -1,13 +1,15 @@
 #include php.h
 #include php_ini.h
 
+#define PHP_REGISTRY_KEY SOFTWARE\\PHP
+
 void UpdateIniFromRegistry(char *path TSRMLS_DC)
 {
char *p, *orig_path;
HKEY MainKey;
char *strtok_buf = NULL;
 
-   if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SOFTWARE\\PHP\\Per Directory Values, 0, 
KEY_READ, MainKey)!=ERROR_SUCCESS) {
+   if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, PHP_REGISTRY_KEY \\Per Directory 
Values, 0, KEY_READ, MainKey)!=ERROR_SUCCESS) {
return;
}
 
@@ -85,4 +87,24 @@
}
RegCloseKey(MainKey);
efree(orig_path);
+}
+
+#define PHPRC_REGISTRY_NAME IniFilePath
+
+char *GetIniPathFromRegistry()
+{
+   char *reg_location = NULL;
+   HKEY hKey;
+   
+   if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, PHP_REGISTRY_KEY, 0, KEY_READ, hKey) == 
ERROR_SUCCESS) {
+   reg_location = emalloc(MAXPATHLEN+1);
+   DWORD buflen = MAXPATHLEN;
+   if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, 
buflen) != ERROR_SUCCESS) {
+   efree(reg_location);
+   reg_location = NULL;
+   return reg_location;
+   }
+   RegCloseKey(hKey);
+   }
+   return reg_location;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 registry.c

2003-10-19 Thread Stanislav Malyshev
stasSun Oct 19 06:36:36 2003 EDT

  Modified files:  
/php-src/win32  registry.c 
  Log:
  fix compilation
  
Index: php-src/win32/registry.c
diff -u php-src/win32/registry.c:1.13 php-src/win32/registry.c:1.14
--- php-src/win32/registry.c:1.13   Sun Oct 19 06:22:21 2003
+++ php-src/win32/registry.cSun Oct 19 06:36:36 2003
@@ -97,8 +97,8 @@
HKEY hKey;

if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, PHP_REGISTRY_KEY, 0, KEY_READ, hKey) == 
ERROR_SUCCESS) {
-   reg_location = emalloc(MAXPATHLEN+1);
DWORD buflen = MAXPATHLEN;
+   reg_location = emalloc(MAXPATHLEN+1);
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, 
buflen) != ERROR_SUCCESS) {
efree(reg_location);
reg_location = NULL;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main php_ini.c

2003-10-19 Thread Stanislav Malyshev
stasSun Oct 19 06:39:28 2003 EDT

  Modified files:  
/php-src/main   php_ini.c 
  Log:
  Enable setting php.ini path via the registry
  
  
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.121 php-src/main/php_ini.c:1.122
--- php-src/main/php_ini.c:1.121Tue Jun 10 16:03:42 2003
+++ php-src/main/php_ini.c  Sun Oct 19 06:39:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.121 2003/06/10 20:03:42 imajes Exp $ */
+/* $Id: php_ini.c,v 1.122 2003/10/19 10:39:27 stas Exp $ */
 
 /* Check CWD for php.ini */
 #define INI_CHECK_CWD
@@ -31,6 +31,9 @@
 #include SAPI.h
 #include php_main.h
 #include php_scandir.h
+#ifdef PHP_WIN32
+#include win32/php_registry.h
+#endif
 
 #if HAVE_SCANDIR  HAVE_ALPHASORT  HAVE_DIRENT_H
 #include dirent.h
@@ -297,11 +300,23 @@
} else {
char *default_location;
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 };
+   char *reg_location;
 
-   php_ini_search_path = (char *) emalloc(MAXPATHLEN * 3 + 
strlen(env_location) + 3 + 1);
+   php_ini_search_path = (char *) emalloc(MAXPATHLEN * 4 + 
strlen(env_location) + 3 + 1);
free_ini_search_path = 1;
php_ini_search_path[0] = 0;
 
+#ifdef PHP_WIN32
+   /* Add registry location */
+   reg_location = GetIniPathFromRegistry();
+   if(reg_location != NULL) {
+   if (*php_ini_search_path) {
+   strcat(php_ini_search_path, paths_separator);
+   }
+   strcat(php_ini_search_path, reg_location);
+   efree(reg_location);
+   }
+#endif
/*
 * Prepare search path
 */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 registry.c

2003-10-19 Thread Stanislav Malyshev
stasSun Oct 19 09:47:36 2003 EDT

  Modified files:  
/php-src/win32  registry.c 
  Log:
  fix wrong string length for registry values
  
  
Index: php-src/win32/registry.c
diff -u php-src/win32/registry.c:1.14 php-src/win32/registry.c:1.15
--- php-src/win32/registry.c:1.14   Sun Oct 19 06:36:36 2003
+++ php-src/win32/registry.cSun Oct 19 09:47:35 2003
@@ -72,7 +72,8 @@
RegEnumValue(hKey, i, namebuf, namebuf_len, NULL, 
lType, valuebuf, valuebuf_len);
 
if ((lType == REG_SZ) || (lType == REG_EXPAND_SZ)) {
-   zend_alter_ini_entry(namebuf, namebuf_len + 1, 
valuebuf, valuebuf_len, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+   /* valuebuf_len includes trailing 0 */
+   zend_alter_ini_entry(namebuf, namebuf_len + 1, 
valuebuf, valuebuf_len?valuebuf_len-1:0, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
}
 
i++;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard url.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 16:00:53 2003 EDT

  Modified files:  
/php-src/ext/standard   url.c 
  Log:
  make parse_url work correctly for file uri's on windows, such as
  file:///c:/somepath/somefile.txt
  
  
Index: php-src/ext/standard/url.c
diff -u php-src/ext/standard/url.c:1.69 php-src/ext/standard/url.c:1.70
--- php-src/ext/standard/url.c:1.69 Mon Oct 13 00:27:23 2003
+++ php-src/ext/standard/url.c  Sun Oct 19 16:00:51 2003
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: url.c,v 1.69 2003/10/13 04:27:23 iliaa Exp $ */
+/* $Id: url.c,v 1.70 2003/10/19 20:00:51 shane Exp $ */
 
 #include stdlib.h
 #include string.h
@@ -126,6 +126,12 @@
s = e + 3;
if (!strncasecmp(file, ret-scheme, sizeof(file))) 
{
if (*(e + 3) == '/') {
+   /* support windows drive letters as in:
+  file:///c:/somedir/file.txt
+   */
+   if (*(e + 5) == ':') {
+   s = e + 4;
+   }
goto nohost;
}
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c php_fopen_wrappers.h /main/streams plain_wrapper.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 16:04:34 2003 EDT

  Modified files:  
/php-src/ext/standard   basic_functions.c php_fopen_wrappers.h 
/php-src/main/streams   plain_wrapper.c 
  Log:
  make file uri's work with streams
  
  
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.632 
php-src/ext/standard/basic_functions.c:1.633
--- php-src/ext/standard/basic_functions.c:1.632Tue Oct 14 20:18:53 2003
+++ php-src/ext/standard/basic_functions.c  Sun Oct 19 16:04:32 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.632 2003/10/15 00:18:53 wez Exp $ */
+/* $Id: basic_functions.c,v 1.633 2003/10/19 20:04:32 shane Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1147,6 +1147,7 @@
PHP_MINIT(imagetypes)(INIT_FUNC_ARGS_PASSTHRU);
 
php_register_url_stream_wrapper(php, php_stream_php_wrapper TSRMLS_CC);
+   php_register_url_stream_wrapper(file, php_plain_files_wrapper TSRMLS_CC);
 #ifndef PHP_CURL_URL_WRAPPERS
php_register_url_stream_wrapper(http, php_stream_http_wrapper TSRMLS_CC);
php_register_url_stream_wrapper(ftp, php_stream_ftp_wrapper TSRMLS_CC);
Index: php-src/ext/standard/php_fopen_wrappers.h
diff -u php-src/ext/standard/php_fopen_wrappers.h:1.18 
php-src/ext/standard/php_fopen_wrappers.h:1.19
--- php-src/ext/standard/php_fopen_wrappers.h:1.18  Tue Jun 10 16:03:38 2003
+++ php-src/ext/standard/php_fopen_wrappers.h   Sun Oct 19 16:04:32 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_fopen_wrappers.h,v 1.18 2003/06/10 20:03:38 imajes Exp $ */
+/* $Id: php_fopen_wrappers.h,v 1.19 2003/10/19 20:04:32 shane Exp $ */
 
 #ifndef PHP_FOPEN_WRAPPERS_H
 #define PHP_FOPEN_WRAPPERS_H
@@ -28,5 +28,6 @@
 extern PHPAPI php_stream_wrapper php_stream_http_wrapper;
 extern PHPAPI php_stream_wrapper php_stream_ftp_wrapper;
 extern php_stream_wrapper php_stream_php_wrapper;
+extern php_stream_wrapper php_plain_files_wrapper;
 
 #endif
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.23 
php-src/main/streams/plain_wrapper.c:1.24
--- php-src/main/streams/plain_wrapper.c:1.23   Wed Oct  8 06:55:51 2003
+++ php-src/main/streams/plain_wrapper.cSun Oct 19 16:04:33 2003
@@ -16,12 +16,13 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.23 2003/10/08 10:55:51 wez Exp $ */
+/* $Id: plain_wrapper.c,v 1.24 2003/10/19 20:04:33 shane Exp $ */
 
 #include php.h
 #include php_globals.h
 #include php_network.h
 #include php_open_temporary_file.h
+#include ext/standard/url.h
 #include ext/standard/file.h
 #include ext/standard/flock_compat.h
 #include stddef.h
@@ -86,13 +87,18 @@
 PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char 
**opened_path, int options STREAMS_DC TSRMLS_DC)
 {
char *realpath = NULL;
+   php_url *url = NULL;
struct stat st;
int open_flags;
int fd;
-   php_stream *ret;
+   php_stream *ret = NULL;
int persistent = options  STREAM_OPEN_PERSISTENT;
char *persistent_id = NULL;
 
+   if(!filename) {
+   return NULL;
+   }
+
if (FAILURE == php_stream_parse_fopen_modes(mode, open_flags)) {
if (options  REPORT_ERRORS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, `%s' is not a 
valid mode for fopen, mode);
@@ -100,8 +106,13 @@
return NULL;
}

+   if (!strncasecmp(filename, file, 4)) {
+   url = php_url_parse((char *)filename);
+   filename = url-path;
+   }
+
if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) {
-   return NULL;
+   goto stream_fopen_done;
}
 
if (persistent) {
@@ -112,14 +123,10 @@
*opened_path = realpath;
realpath = NULL;
}
-   if (realpath) {
-   efree(realpath);
-   }
/* fall through */
 
case PHP_STREAM_PERSISTENT_FAILURE:
-   efree(persistent_id);;
-   return ret;
+   goto stream_fopen_done;
}
}

@@ -143,22 +150,22 @@
*opened_path = realpath;
realpath = NULL;
}
-   if (realpath) {
-   efree(realpath);
-   }
-   if (persistent_id) {
-   efree(persistent_id);
-   

[PHP-CVS] cvs: CVSROOT / avail

2003-10-19 Thread Rasmus Lerdorf
rasmus  Sun Oct 19 16:35:13 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  pecl/tcpwrap karma for mg
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.763 CVSROOT/avail:1.764
--- CVSROOT/avail:1.763 Fri Oct 17 15:44:22 2003
+++ CVSROOT/avail   Sun Oct 19 16:35:13 2003
@@ -185,6 +185,7 @@
 avail|mroch|pear/XML_RPC
 avail|djg|pear/File_Ogg
 avail|mg|pecl/lzf
+avail|mg|pecl/tcpwrap
 
 # Curl modules
 
avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main/streams plain_wrapper.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 16:57:21 2003 EDT

  Modified files:  
/php-src/main/streams   plain_wrapper.c 
  Log:
  revert file: support in preparation for simpler patch
  
  
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.24 
php-src/main/streams/plain_wrapper.c:1.25
--- php-src/main/streams/plain_wrapper.c:1.24   Sun Oct 19 16:04:33 2003
+++ php-src/main/streams/plain_wrapper.cSun Oct 19 16:57:20 2003
@@ -16,13 +16,12 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.24 2003/10/19 20:04:33 shane Exp $ */
+/* $Id: plain_wrapper.c,v 1.25 2003/10/19 20:57:20 shane Exp $ */
 
 #include php.h
 #include php_globals.h
 #include php_network.h
 #include php_open_temporary_file.h
-#include ext/standard/url.h
 #include ext/standard/file.h
 #include ext/standard/flock_compat.h
 #include stddef.h
@@ -87,18 +86,13 @@
 PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char 
**opened_path, int options STREAMS_DC TSRMLS_DC)
 {
char *realpath = NULL;
-   php_url *url = NULL;
struct stat st;
int open_flags;
int fd;
-   php_stream *ret = NULL;
+   php_stream *ret;
int persistent = options  STREAM_OPEN_PERSISTENT;
char *persistent_id = NULL;
 
-   if(!filename) {
-   return NULL;
-   }
-
if (FAILURE == php_stream_parse_fopen_modes(mode, open_flags)) {
if (options  REPORT_ERRORS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, `%s' is not a 
valid mode for fopen, mode);
@@ -106,13 +100,8 @@
return NULL;
}

-   if (!strncasecmp(filename, file, 4)) {
-   url = php_url_parse((char *)filename);
-   filename = url-path;
-   }
-
if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) {
-   goto stream_fopen_done;
+   return NULL;
}
 
if (persistent) {
@@ -123,10 +112,14 @@
*opened_path = realpath;
realpath = NULL;
}
+   if (realpath) {
+   efree(realpath);
+   }
/* fall through */
 
case PHP_STREAM_PERSISTENT_FAILURE:
-   goto stream_fopen_done;
+   efree(persistent_id);;
+   return ret;
}
}

@@ -150,22 +143,22 @@
*opened_path = realpath;
realpath = NULL;
}
-   goto stream_fopen_done;
+   if (realpath) {
+   efree(realpath);
+   }
+   if (persistent_id) {
+   efree(persistent_id);
+   }
+   return ret;
}
 err:
close(fd);
}
-stream_fopen_done:
-   if (realpath) {
-   efree(realpath);
-   }
-   if (url) {
-   efree(url);
-   }
+   efree(realpath);
if (persistent_id) {
efree(persistent_id);
}
-   return ret;
+   return NULL;
 }
 /* }}} */
 
@@ -966,7 +959,6 @@
 {
/* code ripped off from fopen_wrappers.c */
char *pathbuf, *ptr, *end;
-   php_url *url = NULL;
char *exec_fname;
char trypath[MAXPATHLEN];
struct stat sb;
@@ -983,11 +975,6 @@
return NULL;
}
 
-   if (!strncasecmp(filename, file, 4)) {
-   url = php_url_parse((char *)filename);
-   filename = url-path;
-   }
-
filename_length = strlen(filename);
 
/* Relative path open */
@@ -1003,16 +990,13 @@
 
 
if (((options  STREAM_DISABLE_OPEN_BASEDIR) == 0)  
php_check_open_basedir(filename TSRMLS_CC)) {
-   stream = NULL;
-   goto stream_done;
+   return NULL;
}
 
if (PG(safe_mode)  (!php_checkuid(filename, mode, 
CHECKUID_CHECK_MODE_PARAM))) {
-   stream = NULL;
-   goto stream_done;
+   return NULL;
}
-   stream = php_stream_fopen_rel(filename, mode, opened_path, options);
-   goto stream_done;
+   return php_stream_fopen_rel(filename, mode, opened_path, options);
}
 
/*
@@ -1026,23 +1010,17 @@
if (IS_ABSOLUTE_PATH(filename, filename_length)) {
 
if (((options  STREAM_DISABLE_OPEN_BASEDIR) == 0)  
php_check_open_basedir(filename TSRMLS_CC)) {
- 

[PHP-CVS] cvs: php-src /main/streams plain_wrapper.c streams.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 16:59:12 2003 EDT

  Modified files:  
/php-src/main/streams   plain_wrapper.c streams.c 
  Log:
  A simpler patch to add file uri support
  
  
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.25 
php-src/main/streams/plain_wrapper.c:1.26
--- php-src/main/streams/plain_wrapper.c:1.25   Sun Oct 19 16:57:20 2003
+++ php-src/main/streams/plain_wrapper.cSun Oct 19 16:59:12 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.25 2003/10/19 20:57:20 shane Exp $ */
+/* $Id: plain_wrapper.c,v 1.26 2003/10/19 20:59:12 shane Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -882,6 +882,16 @@
 static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, char 
*path, char *mode,
int options, char **opened_path, php_stream_context *context 
STREAMS_DC TSRMLS_DC)
 {
+   char *filename = path;
+   if (!strncasecmp(filename, file:, sizeof(file:)-1)) {
+   filename += 6;
+   while (*(++filename)=='/');
+#ifdef PHP_WIN32
+   if (*(filename + 1) != ':')
+#endif
+   filename--;
+   }
+
if ((options  USE_PATH)  PG(include_path) != NULL) {
return php_stream_fopen_with_path_rel(path, mode, PG(include_path), 
opened_path, options);
}
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.37 php-src/main/streams/streams.c:1.38
--- php-src/main/streams/streams.c:1.37 Sat Sep 13 15:56:38 2003
+++ php-src/main/streams/streams.c  Sun Oct 19 16:59:12 2003
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.37 2003/09/13 19:56:38 helly Exp $ */
+/* $Id: streams.c,v 1.38 2003/10/19 20:59:12 shane Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1415,14 +1415,20 @@
}
/* TODO: curl based streams probably support file:// properly */
if (!protocol || !strncasecmp(protocol, file, n)) {
-   if (protocol  path[n+1] == '/'  path[n+2] == '/')   {
+   if (protocol  path[n+1] == '/'  path[n+2] == '/'  path[n+3] != 
'/')   {
if (options  REPORT_ERRORS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, remote 
host file access not supported, %s, path);
}
return NULL;
}
if (protocol  path_for_open) {
+   /* skip past protocol and :/, but handle windows correctly */
*path_for_open = (char*)path + n + 1;
+   while (*(++*path_for_open)=='/');
+#ifdef PHP_WIN32
+   if (*(*path_for_open + 1) != ':')
+#endif
+   *path_for_open--;
}

/* fall back on regular file access */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main/streams plain_wrapper.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 17:19:54 2003 EDT

  Modified files:  
/php-src/main/streams   plain_wrapper.c 
  Log:
  finish file uri support, this stuff was unecessary.
  
  
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.26 
php-src/main/streams/plain_wrapper.c:1.27
--- php-src/main/streams/plain_wrapper.c:1.26   Sun Oct 19 16:59:12 2003
+++ php-src/main/streams/plain_wrapper.cSun Oct 19 17:19:54 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.26 2003/10/19 20:59:12 shane Exp $ */
+/* $Id: plain_wrapper.c,v 1.27 2003/10/19 21:19:54 shane Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -882,16 +882,6 @@
 static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, char 
*path, char *mode,
int options, char **opened_path, php_stream_context *context 
STREAMS_DC TSRMLS_DC)
 {
-   char *filename = path;
-   if (!strncasecmp(filename, file:, sizeof(file:)-1)) {
-   filename += 6;
-   while (*(++filename)=='/');
-#ifdef PHP_WIN32
-   if (*(filename + 1) != ':')
-#endif
-   filename--;
-   }
-
if ((options  USE_PATH)  PG(include_path) != NULL) {
return php_stream_fopen_with_path_rel(path, mode, PG(include_path), 
opened_path, options);
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml CREDITS config.m4 libxml.c php_libxml.h /main internal_functions_win32.c /win32 php4dllts.dsp

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 17:48:47 2003 EDT

  Added files: 
/php-src/ext/libxml CREDITS config.m4 libxml.c php_libxml.h 

  Modified files:  
/php-src/win32  php4dllts.dsp 
/php-src/main   internal_functions_win32.c 
  Log:
  Add libxml extension for common code that is needed to be shared between
  various xml extensions.  currently the only implemented support is the
  addition of the streams support for libxml.  One new function, 
  libxml_set_streams_context, which allows a streams context to bet set
  prior to loading or writing documents.  This works transparently with any
  extension that uses libxml.  All ini settings that effect streams will
  also now effect the loading and writing of xml documents.
  
  TODO: linux support, not sure if config.m4 will work right.
  
  Index: php-src/win32/php4dllts.dsp
diff -u php-src/win32/php4dllts.dsp:1.134 php-src/win32/php4dllts.dsp:1.135
--- php-src/win32/php4dllts.dsp:1.134   Fri Oct 17 16:52:18 2003
+++ php-src/win32/php4dllts.dsp Sun Oct 19 17:48:44 2003
@@ -1847,10 +1847,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\ext\standard\php_http.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\ext\standard\info.h
 # End Source File
 # Begin Source File
@@ -1891,6 +1887,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\ext\standard\php_http.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\ext\standard\php_lcg.h
 # End Source File
 # Begin Source File
@@ -2000,6 +2000,26 @@
 # Begin Source File
 
 SOURCE=..\ext\sqlite\sqlite.c
+# End Source File
+# End Group
+# End Group
+# Begin Group LIBXML
+
+# PROP Default_Filter 
+# Begin Group Header Files No. 10
+
+# PROP Default_Filter 
+# Begin Source File
+
+SOURCE=..\ext\libxml\php_libxml.h
+# End Source File
+# End Group
+# Begin Group Source Files No. 9
+
+# PROP Default_Filter 
+# Begin Source File
+
+SOURCE=..\ext\libxml\libxml.c
 # End Source File
 # End Group
 # End Group
Index: php-src/main/internal_functions_win32.c
diff -u php-src/main/internal_functions_win32.c:1.81 
php-src/main/internal_functions_win32.c:1.82
--- php-src/main/internal_functions_win32.c:1.81Mon Aug 25 22:50:39 2003
+++ php-src/main/internal_functions_win32.c Sun Oct 19 17:48:45 2003
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: internal_functions_win32.c,v 1.81 2003/08/26 02:50:39 sniper Exp $ */
+/* $Id: internal_functions_win32.c,v 1.82 2003/10/19 21:48:45 shane Exp $ */
 
 /* {{{ includes
  */
@@ -81,6 +81,7 @@
 #include ext/zlib/php_zlib.h
 #endif
 #if HAVE_LIBXML
+#include ext/libxml/php_libxml.h
 #if HAVE_DOM
 #include ext/dom/php_dom.h
 #endif
@@ -136,6 +137,7 @@
,phpext_zlib_ptr
 #endif
 #if HAVE_LIBXML
+   ,phpext_libxml_ptr
 #if HAVE_DOM
,phpext_dom_ptr
 #endif

Index: php-src/ext/libxml/config.m4
+++ php-src/ext/libxml/config.m4
dnl
dnl $Id: config.m4,v 1.1 2003/10/19 21:48:46 shane Exp $
dnl

PHP_ARG_ENABLE(libxml, whether to enable LIBXML support,
[  --disable-libxmlDisable new LIBXML support.], yes)

if test -z $PHP_LIBXML_DIR; then
  PHP_ARG_WITH(libxml-dir, libxml2 install dir,
  [  --with-libxml-dir[=DIR]   libxml2 install prefix.], no, no)
fi

if test $PHP_LIBXML != no; then

  PHP_SETUP_LIBXML(LIBXML_SHARED_LIBADD, [
AC_DEFINE(HAVE_LIBXML,1,[ ])
PHP_NEW_EXTENSION(libxml, [libxml.c], 
$ext_shared)
PHP_SUBST(LIBXML_SHARED_LIBADD)
  ], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
  ])
fi

Index: php-src/ext/libxml/libxml.c
+++ php-src/ext/libxml/libxml.c
/*
   +--+
   | PHP Version 4|
   +--+
   | Copyright (c) 1997-2003 The PHP Group|
   +--+
   | This source file is subject to version 3.0 of the PHP license,   |
   | that is bundled with this package in the file LICENSE, and is|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_0.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  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Authors: Shane Caraveo [EMAIL PROTECTED]   |
   |  Wez Furlong [EMAIL PROTECTED]  |
   +--+
 */

/* $Id: libxml.c,v 1.1 2003/10/19 21:48:46 shane Exp $ */

#define IS_EXT_MODULE

#ifdef HAVE_CONFIG_H

[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/libxml libxml.c php_libxml.h /ext/simplexml simplexml.c /ext/xml xml.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 19:17:58 2003 EDT

  Modified files:  
/php-src/ext/domphp_dom.c 
/php-src/ext/xmlxml.c 
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/libxml libxml.c php_libxml.h 
  Log:
  add global init/shutdown functions for libxml.  this is required as
  shutdown is not safe to call multiple times, and to make streams work
  correctly some init stuff has to happen in a specific order
  
  
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.36 php-src/ext/dom/php_dom.c:1.37
--- php-src/ext/dom/php_dom.c:1.36  Mon Oct  6 17:28:01 2003
+++ php-src/ext/dom/php_dom.c   Sun Oct 19 19:17:54 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.36 2003/10/06 21:28:01 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.37 2003/10/19 23:17:54 shane Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -32,6 +32,7 @@
 #include dom_properties.h
 
 #include ext/standard/info.h
+#include ext/libxml/php_libxml.h
 #define PHP_XPATH 1
 #define PHP_XPTR 2
 
@@ -702,7 +703,7 @@
REGISTER_LONG_CONSTANT(DOM_INVALID_ACCESS_ERR,INVALID_ACCESS_ERR,
 CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(DOM_VALIDATION_ERR,VALIDATION_ERR,
 CONST_CS | CONST_PERSISTENT);
 
-   xmlInitParser();
+   php_libxml_initialize();
 
return SUCCESS;
 }
@@ -724,13 +725,17 @@
 #if defined(LIBXML_XPTR_ENABLED)
php_info_print_table_row(2, XPointer Support, enabled);
 #endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+   php_info_print_table_row(2, Schema Support, enabled);
+   php_info_print_table_row(2, RelaxNG Support, enabled);
+#endif
php_info_print_table_end();
 }
 /* }}} */
 
 PHP_MSHUTDOWN_FUNCTION(dom)
 {
-   xmlCleanupParser();
+   php_libxml_shutdown();
 
zend_hash_destroy(dom_domstringlist_prop_handlers);
zend_hash_destroy(dom_namelist_prop_handlers);
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.140 php-src/ext/xml/xml.c:1.141
--- php-src/ext/xml/xml.c:1.140 Sun Aug 31 08:41:50 2003
+++ php-src/ext/xml/xml.c   Sun Oct 19 19:17:55 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.140 2003/08/31 12:41:50 zeev Exp $ */
+/* $Id: xml.c,v 1.141 2003/10/19 23:17:55 shane Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -37,6 +37,9 @@
 
 #include php_xml.h
 # include ext/standard/head.h
+#ifdef LIBXML_EXPAT_COMPAT
+#include ext/libxml/php_libxml.h
+#endif
 
 /* Short-term TODO list:
  * - Implement XML_ExternalEntityParserCreate()
@@ -238,7 +241,7 @@
php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper;
 
 #ifdef LIBXML_EXPAT_COMPAT
-   xmlInitParser();
+   php_libxml_initialize();
 #endif
return SUCCESS;
 }
@@ -253,7 +256,7 @@
 PHP_MSHUTDOWN_FUNCTION(xml)
 {
 #ifdef LIBXML_EXPAT_COMPAT
-   xmlCleanupParser();
+   php_libxml_shutdown();
 #endif
return SUCCESS;
 }
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.64 php-src/ext/simplexml/simplexml.c:1.65
--- php-src/ext/simplexml/simplexml.c:1.64  Tue Oct  7 11:47:23 2003
+++ php-src/ext/simplexml/simplexml.c   Sun Oct 19 19:17:56 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.64 2003/10/07 15:47:23 zeev Exp $ */
+/* $Id: simplexml.c,v 1.65 2003/10/19 23:17:56 shane Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -28,6 +28,7 @@
 #include php_ini.h
 #include ext/standard/info.h
 #include php_simplexml.h
+#include ext/libxml/php_libxml.h
 
 zend_class_entry *sxe_class_entry;
 
@@ -1037,7 +1038,7 @@
sxe.create_object = sxe_object_new;
sxe_class_entry = zend_register_internal_class(sxe TSRMLS_CC);
 
-   xmlInitParser();
+   php_libxml_initialize();
 
return SUCCESS;
 }
@@ -1047,7 +1048,7 @@
  */
 PHP_MSHUTDOWN_FUNCTION(simplexml)
 {
-   xmlCleanupParser();
+   php_libxml_shutdown();
 
return SUCCESS;
 }
@@ -1075,7 +1076,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.64 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.65 $);
php_info_print_table_end();
 }
 /* }}} */
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.1 php-src/ext/libxml/libxml.c:1.2
--- php-src/ext/libxml/libxml.c:1.1 Sun Oct 19 17:48:46 2003
+++ php-src/ext/libxml/libxml.c Sun Oct 19 19:17:56 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.1 2003/10/19 21:48:46 shane Exp $ */
+/* $Id: libxml.c,v 1.2 2003/10/19 23:17:56 shane Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -42,6 +42,9 @@
 
 #include php_libxml.h
 
+/* a true global for 

[PHP-CVS] cvs: php-src /ext/libxml libxml.c

2003-10-19 Thread Rob Richards
rrichards   Sun Oct 19 19:25:49 2003 EDT

  Modified files:  
/php-src/ext/libxml libxml.c 
  Log:
  unescape filepath which libxml excapes
  
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.2 php-src/ext/libxml/libxml.c:1.3
--- php-src/ext/libxml/libxml.c:1.2 Sun Oct 19 19:17:56 2003
+++ php-src/ext/libxml/libxml.c Sun Oct 19 19:25:48 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.2 2003/10/19 23:17:56 shane Exp $ */
+/* $Id: libxml.c,v 1.3 2003/10/19 23:25:48 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -109,13 +109,23 @@
 
 void *php_libxml_streams_IO_open_wrapper(const char *filename)
 {
+   char resolved_path[MAXPATHLEN + 1];
+   int file_exist;
+   php_stream_statbuf ssbuf;
php_stream_context *context = NULL;
+
TSRMLS_FETCH();
+   xmlURIUnescapeString(filename, 0, resolved_path);
+   file_exist = _php_stream_stat_path((char *) resolved_path, ssbuf TSRMLS_CC);
+   if (file_exist == -1) {
+   return NULL;
+   }
+
if (LIBXML(stream_context)) {
context = zend_fetch_resource(LIBXML(stream_context) TSRMLS_CC, -1, 
Stream-Context, NULL, 1, php_le_stream_context());
-   return php_stream_open_wrapper_ex((char *)filename, rb, 
ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, context);
+   return php_stream_open_wrapper_ex((char *)resolved_path, rb, 
ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, context);
}
-   return php_stream_open_wrapper((char *)filename, rb, 
ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL);
+   return php_stream_open_wrapper((char *)resolved_path, rb, 
ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL);
 }
 
 int php_libxml_streams_IO_read(void *context, char *buffer, int len)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml libxml.c

2003-10-19 Thread Rob Richards
rrichards   Sun Oct 19 19:34:40 2003 EDT

  Modified files:  
/php-src/ext/libxml libxml.c 
  Log:
  add generic default error handling rather than the default stderr
  
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.3 php-src/ext/libxml/libxml.c:1.4
--- php-src/ext/libxml/libxml.c:1.3 Sun Oct 19 19:25:48 2003
+++ php-src/ext/libxml/libxml.c Sun Oct 19 19:34:39 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.3 2003/10/19 23:25:48 rrichards Exp $ */
+/* $Id: libxml.c,v 1.4 2003/10/19 23:34:39 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -146,6 +146,25 @@
return php_stream_close((php_stream*)context);
 }
 
+static void php_libxml_error_handler(void *ctx, const char *msg, ...)
+{
+   va_list ap;
+   char *buf;
+   int len;
+
+   va_start(ap, msg);
+   len = vspprintf(buf, 0, msg, ap);
+   va_end(ap);
+   
+   /* remove any trailing \n */
+   while (len  buf[--len] == '\n') {
+   buf[len] = '\0';
+   }
+
+   php_error(E_WARNING, %s, buf);
+   efree(buf);
+}
+
 PHP_LIBXML_API void php_libxml_initialize() {
if (!_php_libxml_initialized) {
/* we should be the only one's to ever init!! */
@@ -167,12 +186,17 @@
php_libxml_streams_IO_write, 
php_libxml_streams_IO_close);
 
+   /* report errors via handler rather than stderr */
+   xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
+
_php_libxml_initialized = 1;
}
 }
 
 PHP_LIBXML_API void php_libxml_shutdown() {
if (_php_libxml_initialized) {
+   /* reset libxml generic error handling */
+   xmlSetGenericErrorFunc(NULL, NULL);
xmlCleanupParser();
_php_libxml_initialized = 0;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2003-10-19 Thread Ilia Alshanetsky
iliaa   Sun Oct 19 21:59:36 2003 EDT

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed bug #25895 (Incorrect detection of safe_mode limited ini options)
  
  
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.633 
php-src/ext/standard/basic_functions.c:1.634
--- php-src/ext/standard/basic_functions.c:1.633Sun Oct 19 16:04:32 2003
+++ php-src/ext/standard/basic_functions.c  Sun Oct 19 21:59:35 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.633 2003/10/19 20:04:32 shane Exp $ */
+/* $Id: basic_functions.c,v 1.634 2003/10/20 01:59:35 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2397,7 +2397,7 @@
return 0;
}

-   return strncmp(option_name, new_option_name, option_len);
+   return !strncmp(option_name, new_option_name, option_len);
 }
 
 /* {{{ proto string ini_set(string varname, string newvalue)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard basic_functions.c

2003-10-19 Thread Ilia Alshanetsky
iliaa   Sun Oct 19 21:59:49 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Fixed bug #25895 (Incorrect detection of safe_mode limited ini options)
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.438 php-src/NEWS:1.1247.2.439
--- php-src/NEWS:1.1247.2.438   Tue Oct 14 23:32:16 2003
+++ php-src/NEWSSun Oct 19 21:59:47 2003
@@ -5,6 +5,8 @@
   on request shutdown). (Wez)
 - Fixed multibyte regex engine to properly handle .* pattern under
   POSIX compatible mode. (K.Kosako kosako at sofnec.co.jp, Moriyoshi)
+- Fixed bug #25895 (Incorrect detection of safe_mode limited ini options).
+  (Ilia)
 - Fixed bug #25836 (last key of multi-dimensional array passed via GPC not
   being escaped when magic_quotes_gpc is on). (Ilia)
 - Fixed bug #25814 (Make flock() return correct value when 3rd argument is
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.543.2.24 
php-src/ext/standard/basic_functions.c:1.543.2.25
--- php-src/ext/standard/basic_functions.c:1.543.2.24   Tue Oct 14 20:19:30 2003
+++ php-src/ext/standard/basic_functions.c  Sun Oct 19 21:59:48 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.543.2.24 2003/10/15 00:19:30 wez Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.25 2003/10/20 01:59:48 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2317,7 +2317,7 @@
return 0;
}

-   return strncmp(option_name, new_option_name, option_len);
+   return !strncmp(option_name, new_option_name, option_len);
 }
 
 /* {{{ proto string ini_set(string varname, string newvalue)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2003-10-19 Thread Rasmus Lerdorf
rasmus  Sun Oct 19 22:02:28 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Limit elf to /ja dirs only
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.764 CVSROOT/avail:1.765
--- CVSROOT/avail:1.764 Sun Oct 19 16:35:13 2003
+++ CVSROOT/avail   Sun Oct 19 22:02:27 2003
@@ -26,7 +26,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,tony2001,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,elf|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-el,phpdoc-id

[PHP-CVS] cvs: php-src /main php_ini.c

2003-10-19 Thread Ilia Alshanetsky
iliaa   Sun Oct 19 22:21:26 2003 EDT

  Modified files:  
/php-src/main   php_ini.c 
  Log:
  Fixed unused variable warning on *nix.
  
  
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.122 php-src/main/php_ini.c:1.123
--- php-src/main/php_ini.c:1.122Sun Oct 19 06:39:27 2003
+++ php-src/main/php_ini.c  Sun Oct 19 22:21:25 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.122 2003/10/19 10:39:27 stas Exp $ */
+/* $Id: php_ini.c,v 1.123 2003/10/20 02:21:25 iliaa Exp $ */
 
 /* Check CWD for php.ini */
 #define INI_CHECK_CWD
@@ -300,7 +300,9 @@
} else {
char *default_location;
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 };
+#ifdef PHP_WIN32
char *reg_location;
+#endif
 
php_ini_search_path = (char *) emalloc(MAXPATHLEN * 4 + 
strlen(env_location) + 3 + 1);
free_ini_search_path = 1;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml libxml.c

2003-10-19 Thread Shane Caraveo
shane   Sun Oct 19 23:11:46 2003 EDT

  Modified files:  
/php-src/ext/libxml libxml.c 
  Log:
  fix the stat check in stream open
  addref to the stream context
  
  
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.4 php-src/ext/libxml/libxml.c:1.5
--- php-src/ext/libxml/libxml.c:1.4 Sun Oct 19 19:34:39 2003
+++ php-src/ext/libxml/libxml.c Sun Oct 19 23:11:45 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.4 2003/10/19 23:34:39 rrichards Exp $ */
+/* $Id: libxml.c,v 1.5 2003/10/20 03:11:45 shane Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -113,12 +113,24 @@
int file_exist;
php_stream_statbuf ssbuf;
php_stream_context *context = NULL;
+   php_stream_wrapper *wrapper = NULL;
+   char *path_to_open = NULL;
 
TSRMLS_FETCH();
xmlURIUnescapeString(filename, 0, resolved_path);
-   file_exist = _php_stream_stat_path((char *) resolved_path, ssbuf TSRMLS_CC);
-   if (file_exist == -1) {
-   return NULL;
+   path_to_open = resolved_path;
+
+   /* logic copied from _php_stream_stat, but we only want to fail
+  if the wrapper supports stat, otherwise, figure it out from
+  the open.  This logic is only to support hiding warnings
+  that the streams layer puts out at times, but for libxml we
+  may try to open files that don't exist, but it is not a failure
+  in xml processing (eg. DTD files)  */
+   wrapper = php_stream_locate_url_wrapper(resolved_path, path_to_open, 
ENFORCE_SAFE_MODE TSRMLS_CC);
+   if (wrapper  wrapper-wops-url_stat) {
+   if (wrapper-wops-url_stat(wrapper, path_to_open, ssbuf TSRMLS_CC) 
== -1) {
+   return NULL;
+   }
}
 
if (LIBXML(stream_context)) {
@@ -255,6 +267,11 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, arg) == FAILURE) {
return;
}
+   if (LIBXML(stream_context)) {
+   ZVAL_DELREF(LIBXML(stream_context));
+   LIBXML(stream_context) = NULL;
+   }
+   ZVAL_ADDREF(arg);
LIBXML(stream_context) = arg;
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /tests/classes abstract_redeclare.phpt

2003-10-19 Thread Kai Schröder
k.schroeder Mon Oct 20 00:49:18 2003 EDT

  Modified files:  
/php-src/tests/classes  abstract_redeclare.phpt 
  Log:
  Fixed typo
  
Index: php-src/tests/classes/abstract_redeclare.phpt
diff -u php-src/tests/classes/abstract_redeclare.phpt:1.3 
php-src/tests/classes/abstract_redeclare.phpt:1.4
--- php-src/tests/classes/abstract_redeclare.phpt:1.3   Sat Aug  9 10:48:47 2003
+++ php-src/tests/classes/abstract_redeclare.phpt   Mon Oct 20 00:49:18 2003
@@ -1,5 +1,5 @@
 --TEST--
-ZE2 A method cannot be redeclared abstrcat
+ZE2 A method cannot be redeclared abstract
 --SKIPIF--
 ?php if (version_compare(zend_version(), '2.0.0-dev', '')) die('skip ZendEngine 2 
needed'); ?
 --FILE--

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml .cvsignore

2003-10-19 Thread Jani Taskinen
sniper  Mon Oct 20 01:37:34 2003 EDT

  Added files: 
/php-src/ext/libxml .cvsignore 
  Log:
  Missing .cvsignore
  

Index: php-src/ext/libxml/.cvsignore
+++ php-src/ext/libxml/.cvsignore
*.lo
*.la
deps
*.plg
*.opt
*.ncb
Release
Release_inline
Debug
Release_TS
Release_TSDbg
Release_TS_inline
Debug_TS

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php