summaryrefslogtreecommitdiff
path: root/main/php_streams.h
Commit message (Collapse)AuthorAgeFilesLines
* Manual merge of the persistent plain file streams code.Wez Furlong2003-03-181-3/+6
| | | | | | See http://news.php.net/article.php?group=php.cvs&article=19680 for more information.
* Avoid using FILE* unless we have to.Wez Furlong2003-03-181-0/+4
|
* MFHSascha Schumann2003-02-271-2/+2
|
* Miscellaneous streams fixes, including probable fixes for:Wez Furlong2003-02-221-0/+5
| | | | | | | | Bug #21131 (fopen with 'a+' and rewind() doesn't work) Bug #21713 (include remote files leaks temporary files + descriptors on Solaris) Bug #21185 (move_uploaded_file() does not ignore open_basedir as it should) Bug #22362 (combinations of fwrite(), fread() and fseek() produce unexpected results)
* - MFH: Fix warnings on UnixWareDerick Rethans2003-01-021-2/+2
|
* MFH: Bump year.Sebastian Bergmann2002-12-311-1/+1
|
* Add missing Id tag.Wez Furlong2002-11-171-0/+2
|
* Revise stream shutdown procedure.Wez Furlong2002-11-171-0/+1
|
* php_stream_fopen_tmpfile now uses php_open_temporary_file rather thanWez Furlong2002-11-161-5/+2
| | | | | | | | | | | | | | | tmpfile(). tmpfile() under win32 will try to use the root directory; the default IIS settings prohibit access to the root directory, which renders tmpfile() useless. PHP's tmpfile() streams are correctly cleaned up and unlinked when closed (or at request shutdown). However, if the stream is cast and passed to a third party library, the temporary file may linger. This is unfortunate, since streams uses this process internally for handling the casting of user-streams. --> some more work is needed on this, but this can be done more easily under Linux.
* Make include/require of user-streams work on systems without fopencookie.Wez Furlong2002-11-161-1/+2
|
* Make the macro use the function and not the other macro as discussedMarcus Boerger2002-11-061-1/+1
| | | | | with Wez.
* php_stream replacement for fprintfMarcus Boerger2002-11-061-0/+4
| | | | | #Agreed by Wez - I will use this mysel soon.
* correct define: silences compiler warning in http_fopen_wrapper.cMarcus Boerger2002-11-051-1/+1
|
* A better fix for bug #20110.Ilia Alshanetsky2002-10-281-5/+8
|
* Refine stream_select() to work with streams that have data in their readWez Furlong2002-10-211-1/+2
| | | | | | | | | | buffers. When selecting for read, the streams are examined; if any of them have pending read data, no actual select(2) call is performed; instead the streams with buffered data are returned; just like a regular select call. Prevent erroneous warning in stream_select when obtaining the fd.
* made fgets() binary safe.Wez Furlong2002-10-191-2/+4
| | | | | | | | | | | php_stream_gets is now a macro which calls php_stream_get_line. The latter has an option argument to return the number of bytes in the line. Functions like fgetcsv(), fgetss() can be made binary safe by calling php_stream_get_line directly. # HEADS UP: You will need to make clean after updating your CVS, as the # binary signature has changed.
* Fixed bug #19971 (optimized the file() function).Ilia Alshanetsky2002-10-181-0/+1
| | | | | The file() function is now also binary safe.
* This seems to resolve the issues with fgets.Wez Furlong2002-10-051-0/+2
| | | | | | | | I've moved EOF detection into the streams layer; a stream reader implementation should set stream->eof when it detects EOF. Fixed test for user streams - it still fails but that is due to an output buffering bug.
* replace dont_block with a flag.Wez Furlong2002-10-041-1/+6
|
* Improve the general behaviour of stream_gets and fix its semanticsSascha Schumann2002-10-041-0/+1
| | | | | | | | | | | | | | | | | with regard to sockets. The behaviour should be aligned with PHP 4.2 now. This has been verified to some degree. If the underlying stream operations block when no new data is readable, we need to take extra precautions. If there is buffered data available, we check for a EOL. If it exists, we pass the data immediately back to the caller. This saves a call to the read implementation and will not block where blocking is not necessary at all. If the stream buffer contains more data than the caller requested, we can also avoid that costly step and simply return that data.
* Differentiate between write buffer and streams read buffer sizes.Wez Furlong2002-09-281-1/+8
| | | | | | Add options for timeout and chunk size; previously these were only set-able for socket streams.
* Allow user streams/wrappers to implement fstat(), opendir() and stat().Wez Furlong2002-09-281-0/+2
|
* Rename file_get_wrapper_data -> file_get_meta_data.Wez Furlong2002-09-261-1/+2
| | | | | | | | | | It now always returns useful information for all streams. Unified that data with socket_get_status and made socket_get_status an alias for file_get_meta_data. Fix Location header following which was broken in this commit: http://cvs.php.net/diff.php/php4/ext/standard/http_fopen_wrapper.c?r1=1.41&r2=1.42&ty=h
* Implement persistent streams. (for pfsockopen).Wez Furlong2002-09-251-6/+15
| | | | | | Juggle some includes/definitions. Tidy up streams use in ext/standard/file.c
* Enable include("http://....") under win32 by downloading to a temporaryWez Furlong2002-09-231-1/+1
| | | | | | stream so that flex will get on nicely with the content. # untested; theoretically it should work just fine.
* fix some warnings.Wez Furlong2002-09-231-2/+2
|
* Revise buffer/seek code a little.Wez Furlong2002-09-231-0/+4
| | | | | | Tidy up user streams even more. Make test case quite aggressive.
* Implement read buffering in streams.Wez Furlong2002-09-231-2/+17
| | | | | | | | | | | | Eliminate similar code from network.c. Implement fgets equivalent at the streams level, which can detect the mac, dos and unix line endings and handle them appropriately. The default behaviour is unix (and dos) line endings. An ini option to control this behaviour will follow. # Don't forget to make clean! # I've done some testing but would appreciate feedback from # people with scripts/extensions that seek around a lot.
* Fix a couple of bad pointer indirections (oops).Wez Furlong2002-09-071-1/+1
| | | | | | Lets stick to a single category of "http" for the "user_agent" context override.
* NetWare related additions/modificationsAnantha Kesari H Y2002-09-051-0/+4
|
* Add a "closing" parameter for filters to determine if a flush is the lastWez Furlong2002-08-251-5/+5
| | | | | | flush before the stream is closed. This allows filters to finish a chunk and write footers etc.
* Remove php_stream_error as discussed with Rasmus.Wez Furlong2002-08-251-4/+0
| | | | | Unify error messages for ext/ftp. (which was using php_stream_error).
* Implement filter API for streams.Wez Furlong2002-08-201-4/+68
| | | | | | | | | | | | | | | | | | Filters can be stacked onto a stream; more details will follow in docs and on php-dev. Implement "string.rot13" filter Allows the following script: $fp = fopen("file.txt", "r"); stream_filter_prepend($fp, "string.rot13"); // File contents will be subject to a rot13 transformation before // being output. fpassthru($fp); fclose($fp);
* Remove php_stream_sock_set_blocking and replace withWez Furlong2002-08-191-1/+16
| | | | | | | | | | | php_stream_set_option which can be used in a similar way as ioctl() to set options for streams. Current options include buffering and blocking support. o Buffer control is support for stdio based streams. o Blocking/non-blocking is supported for stdio and socket based streams.
* Enhance Ilia's recent patch to query the wrapper subsystem to determineWez Furlong2002-08-161-0/+4
| | | | | if a filename is a URL and thus if safe-mode checks should be skipped.
* Properly implement TSRM parameters to the new log_errorWez Furlong2002-08-111-0/+2
| | | | | | function... (Thanks Marcus!) Add a convenience macro for importing a stream from a zval.
* Introduce an error stack for wrappers, to help prevent multiple errorsWez Furlong2002-08-111-0/+7
| | | | | | | | and warnings (some of which are bogus) when there are problems opening streams. Implement sanity check on the mode used to open ftp and http connections. This fixes Bug 12004.
* macro definition fixed, guess it was the usual kind of cut&past bug?Hartmut Holzgraefe2002-06-111-1/+1
|
* - Since streams are always enabled, instead of just printing 'enabled' we tellMarkus Fischer2002-06-081-0/+4
| | | | | what streams are currently registered.
* Implement context option setting API.Wez Furlong2002-04-301-1/+13
| | | | | | | Add/amend debugging code for sockets. Add a flag that will help the http wrapper optimize itself when it is not being used for include/require.
* Always initialize wrappers, regardless of PG(allow_url_fopen).Wez Furlong2002-04-161-5/+26
| | | | | | | | | | | | Add is_url field to wrapper structure; the stream wrapper openers will disallow opening is is_url && !PG(allow_url_fopen). Add infrastructure for stat($url) and opendir($url). Tidy up/centralize code that locates and instantiates wrappers for the various operations. Implement opendir for plain files. Make the PHP opendir and dir functions use the streams implementations. Add modelines for syntax highlighting the pear scripts in vim
* Adding PHPAPI needed for exif on Win32Frank M. Kromann2002-04-151-1/+1
|
* fix segfaultWez Furlong2002-04-121-1/+1
|
* Implement stream context and status notification system.Wez Furlong2002-04-101-5/+96
| | | | | | Bump the BC for zlib notice to a warning # See my RFC to php-dev a few days ago
* Phase 3 of OO wrapper cleanupWez Furlong2002-03-281-2/+21
| | | | | # What was phase 2?
* Phase 1 of wrapper OO cleanup.Wez Furlong2002-03-241-8/+10
| | | | | # Collecting underpants
* Convert the gzfile related functions into aliases for their equivalentsWez Furlong2002-03-211-0/+5
| | | | | | | | | | in ext/standard/file.c, so a gzopen()ed file pointer can be used in fread, fseek etc. Improved behaviour of zlib stream. Moved passthru code into streams.c # I'm not happy about BG(mmap_file) Nuked gzgetss_state as no longer needed.
* Make state parameter of php_strip_tags passed by reference.Wez Furlong2002-03-201-0/+1
| | | | | Move state tracking to stream structure.
* Streams are all tracked as resources now.Wez Furlong2002-03-201-0/+20
| | | | | | Add some logic that will help track down leaks when debug is enabled.
* Improve behaviour of the stream casting operation.Wez Furlong2002-03-191-0/+5
| | | | | Improve interaction with fopencookie.