Wez Furlong
2e4b6ef181
Fix a little leak.
2002-08-16 12:02:42 +00:00
Wez Furlong
c2cbae6dd3
Enhance Ilia's recent patch to query the wrapper subsystem to determine
...
if a filename is a URL and thus if safe-mode checks should be skipped.
2002-08-16 09:50:24 +00:00
Wez Furlong
5a21ab42cb
Introduce an error stack for wrappers, to help prevent multiple errors
...
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.
2002-08-11 10:53:10 +00:00
Wez Furlong
1144bdb04d
remove obsolete TSRMLS_FETCH
2002-08-10 20:20:55 +00:00
James Cox
1ae29d455c
@Copy() fixed to return 1 on 0 byte files. Patch by Ilia A <ilia@prohost.org>.
2002-08-09 00:33:06 +00:00
Edin Kadribasic
0af2ae718f
No need to check for allow_url_fopen here.
...
#This closes two bugs which I cannot find right now courtesy our buggy bug
#database.
2002-06-19 00:31:30 +00:00
Markus Fischer
17b3ef47f3
- Fix builtin gets() emulation (hopefully).
2002-06-11 21:22:12 +00:00
Markus Fischer
4290da23d0
- Add missing Id tag.
2002-06-11 18:55:48 +00:00
Markus Fischer
709785a90a
- Always \0 terminate data returned from _php_stream_copy_to_mem().
2002-06-11 18:54:57 +00:00
Markus Fischer
0cd40c2808
- Since streams are always enabled, instead of just printing 'enabled' we tell
...
what streams are currently registered.
2002-06-08 10:25:44 +00:00
Wez Furlong
b0ed189159
Remove debug code that should not have been committed.
...
# I must apologize for the quality of my commits tonight...
2002-04-30 00:22:44 +00:00
Wez Furlong
37411dd674
Implement context option setting API.
...
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.
2002-04-30 00:16:00 +00:00
Wez Furlong
928bae9cf8
Make scheme part decoding rfc2396 compliant.
...
Change zlib:// and bzip2:// to compress.zlib:// and compress.bzip2://
Tidy up old socket/network code/comments.
2002-04-19 10:06:41 +00:00
Wez Furlong
b10b24d50c
Always initialize wrappers, regardless of PG(allow_url_fopen).
...
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
2002-04-16 22:14:27 +00:00
Frank M. Kromann
643fb6dcdf
Adding PHPAPI needed for exif on Win32
2002-04-15 22:22:53 +00:00
Wez Furlong
e1d0a14790
Implement stream context and status notification system.
...
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Wez Furlong
62538caa86
Added BC support for old style zlib: wrapper.
...
Added notice when a requested wrapper is not found.
# This BC thing was giving me nightmares.
# It took me 10 minutes to realize I hadn't compiled in zlib support also.
2002-04-06 17:29:39 +00:00
Wez Furlong
a0f165a5cb
main/streams.c
2002-04-02 16:46:33 +00:00
Wez Furlong
2539cbc74c
Phase 3 of OO wrapper cleanup
...
# What was phase 2?
2002-03-28 00:49:00 +00:00
Wez Furlong
5ee65bd8f5
Phase 1 of wrapper OO cleanup.
...
# Collecting underpants
2002-03-24 18:05:49 +00:00
Marcus Boerger
4df6833a79
-defined php_stream_temp_new() for standard temp streams
2002-03-23 17:51:20 +00:00
Markus Fischer
1d75089d8b
*** empty log message ***
2002-03-21 22:35:02 +00:00
Wez Furlong
06f6e47e4c
Require that wrappers use <protocol>://<path> to avoid
...
ambiguities when filenames have ':' characters.
This slightly breaks BC with the old style zlib: wrapper.
2002-03-21 17:02:50 +00:00
Wez Furlong
a662f012bb
Convert the gzfile related functions into aliases for their equivalents
...
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.
2002-03-21 01:11:52 +00:00
Wez Furlong
659a071e3d
Streams are all tracked as resources now.
...
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong
7990d742e5
Improve behaviour of the stream casting operation.
...
Improve interaction with fopencookie.
2002-03-19 23:29:37 +00:00
Wez Furlong
14a3911866
fix for bug #16168
2002-03-19 17:49:02 +00:00
Wez Furlong
32a4f35580
register some constants for user streams
2002-03-19 14:35:55 +00:00
Wez Furlong
b808af8601
Make file_get_wrapper_data return the underlying PHP object for
...
user-space streams.
2002-03-19 13:42:25 +00:00
Wez Furlong
06712a508a
Implement user-space streams.
...
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Zeev Suraski
16c9da0eed
Fix build under Release_TS
...
Maybe separating TSRMLS away wasn't such a good idea (sorry Wez :)
2002-03-18 19:47:50 +00:00
Wez Furlong
c978602a0b
fix non-TS build...
2002-03-18 19:13:11 +00:00
Wez Furlong
c9d5e13738
TSRMLS related work on streams, as discussed with Zeev.
...
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Zeev Suraski
8cb649d06d
Make Sebastian happy
2002-03-18 09:12:31 +00:00
Zeev Suraski
73e79322ba
Fix the build and all of the outstanding VC++ warnings
2002-03-18 08:05:28 +00:00
Wez Furlong
d2d8762267
Streams now make more use of the memory manager, so tracking down
...
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
12a0092376
Fix for php_stream_gets when the implementation does not support it
...
natively (Thanks Marcus).
Implement php_stream_make_seekable() and add STREAM_MUST_SEEK as an
option to php_stream_open_wrapper().
See README.STREAMS for usage.
2002-03-17 14:21:01 +00:00
Marcus Boerger
34cb24fcf7
-fix bug with wrappers
2002-03-17 12:06:41 +00:00
Marcus Boerger
bfe7a9acaf
-copy_stream_to_stream returns size if maxlen == PHP_STREAM_COPY_ALL
...
#had to commit myself to do the rest...
2002-03-16 20:05:08 +00:00
Wez Furlong
b28e19c004
fix ftell/fseek in stdio streams
2002-03-16 18:52:03 +00:00
Andi Gutmans
a18000f163
- Indentation fix.
...
Never do:
if (expr) {
}
else
It should be:
if (expr) {
} else {
2002-03-16 18:16:55 +00:00
Wez Furlong
0447327118
Implement get_file_contents() as discussed (briefly!) by myself, Derick
...
and Sterling on php-dev some months ago.
It returns the file contents as a string, and uses mmap if possible.
2002-03-16 16:06:18 +00:00
Wez Furlong
bed04279c3
Hopefully fix resource usage so that we have no leaks and don't segfault.
2002-03-16 14:39:51 +00:00
Wez Furlong
30647934a4
Tweak the API to be more consistent.
...
Update docs.
2002-03-16 13:48:57 +00:00
Wez Furlong
31ed1707a1
Hopefully fix probs with apache.
2002-03-16 11:24:12 +00:00
Wez Furlong
29cb19ad18
some minor docu-in-header changes
2002-03-16 03:50:17 +00:00
Yasuo Ohgaki
2d08c867c8
ZTS build fix
2002-03-16 03:33:48 +00:00
Yasuo Ohgaki
115a0be944
ZTS build fix
2002-03-16 03:30:19 +00:00
Wez Furlong
636829345e
Allow php_stream_copy_to_stream to do nothing when used with code
...
that calculates a max length of zero. (Thanks again Marcus).
2002-03-16 02:48:35 +00:00
Wez Furlong
7da30fa08c
some tweaks for seek/read used in image.c (thanks Marcus)
2002-03-16 02:39:39 +00:00