- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents($filename), which returns the contents of a file
as a string. It also supports URL wrappers. (Wez)
-- Changed fopen wrappers ('php://', 'bz2://' and 'zlib://') to require the
- '://' separator (instead of simply 'php:', 'bz2:' and 'zlib:') to avoid
- ambiguities when filenames have ':' characters. (Wez)
+- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
+ when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
- . Added BZip2 stream support.
+ . Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper.
. Most extensions now support streams when passing files, which means
#ifdef ZTS
static int fsock_globals_id;
-#else
-extern int le_fp;
#endif
#ifdef PHP_WIN32
#ifdef ZTS
ts_allocate_id(&zlib_globals_id, sizeof(zend_zlib_globals), (ts_allocate_ctor) php_zlib_init_globals, NULL);
#endif
- php_register_url_stream_wrapper("zlib", &php_stream_gzip_wrapper TSRMLS_CC);
+ php_register_url_stream_wrapper("compress.zlib", &php_stream_gzip_wrapper TSRMLS_CC);
REGISTER_LONG_CONSTANT("FORCE_GZIP", CODING_GZIP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FORCE_DEFLATE", CODING_DEFLATE, CONST_CS | CONST_PERSISTENT);
self = emalloc(sizeof(*self));
- if (strncasecmp("zlib://", path, 7) == 0)
- path += 7;
+ if (strncasecmp("compress.zlib://", path, 16) == 0)
+ path += 16;
else if (strncasecmp("zlib:", path, 5) == 0)
path += 5;
memset(&unix_addr, 0, sizeof(unix_addr));
unix_addr.sun_family = AF_UNIX;
- /* we need to be binary safe for the on systems that support an abstract
+ /* we need to be binary safe on systems that support an abstract
* namespace */
if (pathlen >= sizeof(unix_addr.sun_path)) {
/* On linux, when the path begins with a NUL byte we are
if (options & IGNORE_URL)
return &php_plain_files_wrapper;
- for (p = path; isalnum((int)*p); p++) {
+ for (p = path; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++) {
n++;
}
protocol = path;
} else if (strncasecmp(path, "zlib:", 5) == 0) {
/* BC with older php scripts and zlib wrapper */
- protocol = path;
- n = 4;
- zend_error(E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"zlib://\" instead.");
+ protocol = "compress.zlib";
+ n = 13;
+ zend_error(E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"compress.zlib://\" instead.");
}
if (protocol) {