summaryrefslogtreecommitdiff
path: root/main/php_streams.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove ZSTR() from stream macros. Calling function must apply this macroFrank M. Kromann2006-04-281-4/+4
|
* Fix copy/paste typo in php_stream_path_decode() protoSara Golemon2006-04-181-1/+1
|
* Add API hooks and unicode.filesystem_encoding for handling unicodeSara Golemon2006-03-311-0/+18
| | | | | | | | | | conversions of filename entries. Normal path conversions will simply use this converter, Certain other protocols (such as http) which specify a required character set (utf8), may override the conversion by defining a path_encode() and/or path_decode() wrapper ops method.
* Make php_stream_copy_to_mem() unicode aware andSara Golemon2006-03-301-2/+6
| | | | | | | | | | | | | | | update userspace function file_get_contents(). Note: fgc()'s second parameter (use_include_path) has been changed to be a bitmask "flags" parameter instead. For the most commonly used values (TRUE, 1) this will continue functioning as expected since the value of FILE_USE_INCLUDE_PATH is (coincidentally) 1. The impact to other values should be noted in the migration6 guide. This change makes it possible to allow fgc() to return binary file contents (default) or unicode transcoded contents (using FILE_TEXT flag).
* Another (and hopefully last) major streams commit.Sara Golemon2006-03-291-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This moves unicode conversion to the filter layer (rather than at the lower streams layer) unicode_filter.c has been moved from ext/unicode to main/streams as it's an integral part of the streams unicode conversion process. There are now three ways to set encoding on a stream: (1) By context $ctx = stream_context_create(NULL,array('encoding'=>'latin1')); $fp = fopen('somefile', 'r+t', false, $ctx); (2) By stream_encoding() $fp = fopen('somefile', 'r+'); stream_encoding($fp, 'latin1'); (3) By filter $fp = fopen('somefile', 'r+'); stream_filter_append($fp, 'unicode.from.latin1', STREAM_FILTER_READ); stream_filter_append($fp, 'unicode.to.latin1', STREAM_FILTER_WRITE); Note: Methods 1 and 2 are convenience wrappers around method 3.
* Add php_stream_get_record_unicde() API call.Sara Golemon2006-03-241-0/+2
| | | | | Update stream_get_line() userspace function to handle unicode streams.
* More stream updates.Sara Golemon2006-03-141-3/+7
| | | | | | | | | | | fgets() will work now as will anything which calls one of the _php_stream_get_line() family of functions. The one exception here is when the legacy defines are used on a unicode stream. At the moment they'll simply return NULL, I'll update these to do sloppy conversion in a bit. 'make (u)test' still doesn't work, but it's a different doesn't work.
* Refactor streams layer for PHP6.Sara Golemon2006-03-131-22/+27
| | | | | | | | | | Don't be frightened by the size of this commit. A significant portion of it is restoring the read buffer semantics back to what PHP4/5 use. (Or a close aproximation thereof). See main/streams/streams.c and ext/standard/file.c for a set of UTODO comments covering work yet to be done.
* bump year and license versionfoobar2006-01-011-3/+3
|
* Unicode support.Andrei Zmievski2005-08-111-5/+25
|
* - Bumber up yearfoobar2005-08-031-1/+1
|
* fix bugs #32742 (segmentation fault when the stream with a wrapper is not ↵Antony Dovgal2005-05-161-0/+1
| | | | | | | closed), #32171 (Userspace stream wrapper crashes PHP)
* Fixed bug #31515 (Improve performance of scandir() by factor of 10 or so).Ilia Alshanetsky2005-02-221-4/+4
|
* Avoid bug where stream_copy_to_stream() call for precisely 2000000 bytes wouldWez Furlong2005-02-061-4/+2
| | | | | | result in entire resource being copied. The mmap brake is already present inside mmap_range() and is set to 1MB.
* Fixed bug #29801 (Set limit on the size of mmapable data).Ilia Alshanetsky2004-11-151-2/+5
|
* NETWARE has a proper stat structure Now no need of CLIB_STAT_PATCH checksAnantha Kesari H Y2004-09-291-4/+0
|
* Added stream_filter_remove() to cancel a stream filter.Sara Golemon2004-09-141-0/+1
| | | | | | | | | | Register filters as resources when instantiated by stream_filter_(ap|pre)pend(). Export php_stream_filter_flush() internal function to wind buffered data out of a particular filter until consumed by a later filter or sent to stream->readbuffer or stream->ops->write()
* Add stream_wrapper_unregister()Sara Golemon2004-09-101-0/+2
| | | | | | | | | Disables a wrapper (user-defined or built-in) for the life of the request. Add stream_wrapper_restore() Restores the wrapper originally defined at the time the request started to the protocol name mentioned.
* BugFix#28868 (Part Two): This fixes thread unsafety in the userspaceSara Golemon2004-06-211-1/+3
| | | | | filters which relates to the fix just applied for userspace wrappers.
* BugFix#28868: Wrapper hash not thread-safe.Sara Golemon2004-06-211-1/+3
| | | | | | | | Userdefined wrappers were being registered into a global wrapper hash which can cross threads. Termination of once instance then has the potential to leave an active stream in another instance with no wrapper leading to segfault.
* wrap all PHPAPI prototypes into BEGIN_EXTERN_C/END_EXTERN_C blocksHartmut Holzgraefe2004-02-201-0/+17
| | | | | (else they won't be usable from C++ extensions)
* 'Bug Fix': scandir, being a new function in PHP5 should have always been ↵Sara Golemon2004-01-281-0/+7
| | | | wrapper aware.
* - Happy new year and PHP 5 for rest of the files too..foobar2004-01-081-2/+2
| | | | | # Should the LICENSE and Zend/LICENSE dates be updated too?
* Fix Win32 Build. mkdir/rmdir are macrosSara Golemon2003-12-131-2/+2
|
* Route mkdir()/rmdir() via wrapper ops.Sara Golemon2003-12-131-0/+17
| | | | | | Move current rmdir()/rmdir() code to plain_wrappers.c Implement mkdir()/rmdir() in ftp:// wrapper
* Route rename() via wrapper ops.Sara Golemon2003-12-121-0/+3
| | | | | | | Move current rename() code to main/streams/plain_wrapper.c Implement ftp/rename() Implement userstreams/rename()
* Move safemode/basedir checks for url_stat to plain_wrapper.Sara Golemon2003-12-011-0/+1
|
* Route php_stat() via streams/url_stat API (php_stream_stat_path).Sara Golemon2003-11-281-3/+7
| | | | | This enables fopen-wrappers support on stat() and related family calls.
* port "liveness" checks and a couple of other things from the 4.3 branch.Wez Furlong2003-11-271-0/+4
| | | | | | Liveness checks are used to validate persistent socket connects when they are re-used.
* - Always store the URI path in the streams structure, and expose it withDerick Rethans2003-11-031-1/+1
| | | | | stream_get_meta_data().
* Finalize the closing process of persistent streams. The currentIlia Alshanetsky2003-07-291-0/+3
| | | | | | | | | | | | | | | behavior/API is as follows: 1) To close a persistent use php_stream_pclose(), it will close the stream and remove it from the persistent list. 2) Inside PHP code only explicit fclose() will close persistent streams, all other actions such as unset() or assigning a value to stream handle will not. 3) Regular streams can still be closed by either fclose(), unset() or an assignment of a value to the stream handler.
* Merge selectable descriptor casting from PHP_4_3 branch.Wez Furlong2003-06-281-0/+2
|
* updating license information in the headers.James Cox2003-06-101-3/+3
|
* Fold 'options' parameter into wops->unlink methodSara Golemon2003-05-141-1/+1
|
* Setup unlink() method in wrapper_ops structure, implement unlink in ↵Sara Golemon2003-05-141-0/+3
| | | | plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops
* Macro: php_stream_get_from_zval(php_stream *stream, zval **zstream, char ↵Sara Golemon2003-04-171-0/+6
| | | | *mode, int options, char **opened_path, php_stream_context *context) Z_TYPE_PP(zstream) can be either IS_RESOURCE (An already opened stream) or IS_STRING (a path to a stream to be opened)
* Implement persistent plain file streams.Wez Furlong2003-03-181-1/+4
| | | | | | | | | | | | | | | | | Usage: php_stream *stream = php_stream_fopen("/path/to/file", "r+b", NULL, STREAM_OPEN_PERSISTENT | ENFORCE_SAFE_MODE | REPORT_ERRORS); the filename and mode are combined to form the hash key for the persistent list; they must be identical for this same stream to be returned again in the next request. Calling php_stream_close() on a persistent stream *will* close it, as is usual with all persistent resources in PHP/ZE. This is deliberately *not* exposed to user-space PHP at this time.
* Add a generic meta data api for streams.Wez Furlong2003-02-271-0/+3
|
* Another big commit (tm).Wez Furlong2003-02-271-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Main Changes: - Implement a socket transport layer for use by all code that needs to open some kind of "special" socket for network or IPC. - Extensions can register (and override) transports. - Implement ftruncate() on streams via the ioctl-alike option interface. - Implement mmap() on streams via the ioctl-alike option interface. - Implement generic crypto API via the ioctl-alike option interface. (currently only supports OpenSSL, but could support other SSL toolkits, and other crypto transport protocols). Impact: - tcp sockets can be overloaded by the openssl capable sockets at runtime, removing the link-time requirement for ssl:// and https:// sockets and streams. - checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since there are now a range of possible socket-type streams. Working towards: - socket servers using the new transport layer - mmap support under win32 - Cleaner code. # I will be updating the win32 build to add the new files shortly # after this commit.
* rename macro argument so that it does not partially match the string.Sascha Schumann2003-02-271-2/+2
| | | | | fixes a warning on unixware
* Added locking to streams.Ilia Alshanetsky2003-02-251-0/+9
| | | | | | | Allow PHP to automatically release locks on files when terminating the stream. Fixed bugs in the handling of the 3rd optional parameter to flock().
* MFB: Bunch of streams related fixes.Wez Furlong2003-02-241-0/+3
|
* Implement new filter API, stage 1.Wez Furlong2003-02-181-7/+7
| | | | | | | | | | | | This breaks user-space filters (for the time being), and those weird convert.* filters in ext/standard/filters.c The filters stack has been separated into one chain for read and one chain for write. The user-space stream_filter_append() type functions currently only operate on the read chain. They need extending to work with the write chain too.
* Move some of the streams header into supplementary filesWez Furlong2003-02-171-180/+4
| | | | | | # Just when you thought you had learned your way around the streams code; # I like to keep you all on your toes!
* Moving away from ANSI stdio for plain files.Wez Furlong2003-02-131-0/+4
|
* Added feature request #9173 (added stream_get_line(), this function willIlia Alshanetsky2003-02-091-0/+1
| | | | | | read either the specified number of bytes or until the ending string is found).
* Added missing definitions.Ilia Alshanetsky2003-02-071-1/+6
|
* Fix for bug #21406; infinite loop during filter flushing.Wez Furlong2003-01-061-2/+2
|
* Expose stream_filters_hash so that it can be searched by stream_get_filters()Sara Golemon2003-01-061-2/+2
|
* - Fix warnings on UnixWareDerick Rethans2003-01-021-2/+2
|