Dmitry Stogov
70105187db
Proper fix for bug #39215 Inappropriate close of stdin/stdout/stderr
2007-06-21 12:42:36 +00:00
Sebastian Bergmann
4223aa4d5e
MFH: Bump year.
2007-01-01 09:36:18 +00:00
Antony Dovgal
a726dcaa99
MFH: fix #39850 (SplFileObject throws contradictory/wrong error messages when trying to open "php://wrong")
2006-12-18 14:56:20 +00:00
Rasmus Lerdorf
cea64d52fa
data: and php:stdin/input allow_url_include checks
2006-11-05 20:08:58 +00:00
Ilia Alshanetsky
bd2ab7bc15
Fixed bug #39215 (Inappropriate close of stdin/stdout/stderr).
2006-11-03 13:34:19 +00:00
Ilia Alshanetsky
278dc574f2
E_ERROR > E_RECOVERABLE_ERROR
2006-07-05 17:38:14 +00:00
Ilia Alshanetsky
ccad354535
Make filters without a resource throw E_RECOVERABLE_ERROR rather then
...
E_ERROR
2006-05-16 14:11:52 +00:00
Marcus Boerger
6f1a0f67ff
- Make SplTempFileObject work in 5.1
2006-05-01 16:02:07 +00:00
foobar
5bd93221a8
bump year and license version
2006-01-01 12:51:34 +00:00
Sara Golemon
1340c04976
MFH (r-1.51) #32371 php://input sometimes returns duplicate data
2005-11-17 19:40:38 +00:00
foobar
9477097564
MFH: Nuked EOLs from error messages
2005-08-18 13:34:41 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
Wez Furlong
daa90c915c
Fix #27865 ; don't dup STDIN, STDOUT or STDERR when running under CLI.
2004-04-19 17:41:39 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +00:00
Sara Golemon
c56647833b
Route mkdir()/rmdir() via wrapper ops.
...
Move current rmdir()/rmdir() code to plain_wrappers.c
Implement mkdir()/rmdir() in ftp:// wrapper
2003-12-13 04:07:18 +00:00
Sara Golemon
b1f8236b63
Route rename() via wrapper ops.
...
Move current rename() code to main/streams/plain_wrapper.c
Implement ftp/rename()
Implement userstreams/rename()
2003-12-12 23:06:42 +00:00
James Cox
f68c7ff249
updating license information in the headers.
2003-06-10 20:04:29 +00:00
Sara Golemon
5126fbe556
Setup unlink() method in wrapper_ops structure, implement unlink in plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops
2003-05-14 06:10:04 +00:00
Moriyoshi Koizumi
49b43ad115
Changed stream filter factory to be capable of accepting a zval as a parameter
...
instead of a string
2003-04-16 14:30:25 +00:00
Wez Furlong
86fb577d59
Implement persistent plain file streams.
...
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.
2003-03-18 23:37:54 +00:00
Wez Furlong
ce01fd9526
Avoid using FILE* where possible.
...
Tidy up handling of potential error situations for the php:// wrapper.
2003-03-18 16:40:29 +00:00
Ilia Alshanetsky
14bf872003
Fixed compiler warnings.
2003-02-28 17:26:28 +00:00
Sara Golemon
2002ca0203
Reduce unnecessary filter applications when stream is (read|write) only
2003-02-20 20:05:31 +00:00
Sara Golemon
73c78270b6
Introduce //filter target to php: wrapper to allow inline application of filters during fopen() style opperations
2003-02-18 06:10:14 +00:00
Wez Furlong
95e7c2e9ed
Use FILE*-less implementation for php://(stdin|stdout|stderr)
2003-02-13 13:43:37 +00:00
Sebastian Bergmann
b506f5c8f8
Bump year.
2002-12-31 16:08:15 +00:00
Hartmut Holzgraefe
fb5ac5d286
the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
...
counted up, so lets make it happy although this value is not really
needed in these cases ...
2002-11-21 10:29:11 +00:00
Hartmut Holzgraefe
be5e379ec6
HTTP_RAW_POST_DATA BC fixes
...
# hopefully all done, commiting anyway to continue work on my home box
php://input stream fixes (POST data handerl mangles data, CLI crashbug)
2002-11-12 18:29:11 +00:00
Hartmut Holzgraefe
30ed5a5483
killed some warnings identified by sebastian
2002-10-21 19:08:18 +00:00
Hartmut Holzgraefe
8b7e9d7774
some changes to how request input data (Content-Lenght >0) is handled
...
- webdav-specific stuff removed (should be handled using httpd.conf
LIMIT or equivalents)
- always_populate_raw_post_data now working on any method, not just
POST (and webdav methods with allow_webdav_methods), when
Content-Length is greater zero
- raw input data is also available using php://input stream,
this way one doesn't have to care about memory_limit
- input data is now always consumed (although maybe ignored,
this fixes we had withproblems with keep-alive connections
@ raw POST data is now available as php://input stream (hartmut)
2002-10-21 16:41:06 +00:00
Wez Furlong
077fe52d8b
This seems to resolve the issues with fgets.
...
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.
2002-10-05 10:35:13 +00:00
Wez Furlong
3a67c67737
Rename file_get_wrapper_data -> file_get_meta_data.
...
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
2002-09-26 10:14:41 +00:00
Wez Furlong
4d8a07d529
Implement read buffering in streams.
...
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.
2002-09-23 01:47:04 +00:00
Wez Furlong
97f134cb45
fix warning
2002-09-07 20:54:14 +00:00
Wez Furlong
30082fdb68
Implement php://output wrapper, which can be used to write to the output
...
buffer via PHPWRITE.
2002-09-07 19:00:46 +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
Wez Furlong
4adb1e58eb
Fix declarations (Thanks Sebastian)
2002-04-11 12:13:17 +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
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
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
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
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
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
0f65280cb5
New PHP streams...
2002-03-15 21:03:08 +00:00
Sebastian Bergmann
90613d2282
Maintain headers.
2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
foobar
bad630553b
fix build.
2001-08-01 00:13:02 +00:00
Zeev Suraski
b1de7fc900
More TSRMLS_FETCH annihilation. Enough for today...
2001-07-31 07:09:49 +00:00