Commit Graph

2646 Commits

Author SHA1 Message Date
Antony Dovgal
1417222aee initialize factory 2006-05-19 10:23:43 +00:00
Dmitry Stogov
ab9e070bbf Optimized zend_try/zend_catch macroses (eliminated memcpy()) 2006-05-19 06:11:02 +00:00
Antony Dovgal
e2d3206e78 MFB: fix #37395 (recursive mkdir() fails to create nonexistent directories in root dir) 2006-05-16 13:05:23 +00:00
Ilia Alshanetsky
9ac333f624 MFB: Disable realpath cache when open_basedir or safe_mode are enabled on a
per-request basis.
2006-05-16 00:40:36 +00:00
Marcus Boerger
1bbfe90571 - No need to have this controlled by allow_url_fopen 2006-05-14 19:13:17 +00:00
Marcus Boerger
3856d8da6d - Add strict compliant RFC2397 support (no //) 2006-05-14 18:35:40 +00:00
Marcus Boerger
3b66ab74f9 - RFC2397 add decoding
# done (need to decide whether all examples shouldl work or specs are
# followed)
2006-05-14 01:39:24 +00:00
Marcus Boerger
f9c249407d - Enforce stream mode correct 2006-05-14 01:03:42 +00:00
Marcus Boerger
73069100fd - Change to use dedicated stream ops 2006-05-14 00:45:27 +00:00
Marcus Boerger
4f29479a22 - RFC 2397 meta data handling 2006-05-14 00:40:53 +00:00
Marcus Boerger
29c0f5bede - Initial RFC2397 support
# decoding is missing right now
2006-05-13 17:53:01 +00:00
Dmitry Stogov
b75a22b203 Fixed bug #37306 (max_execution_time = max_input_time). 2006-05-11 22:08:55 +00:00
Marcus Boerger
1f030db700 - Fix error mode handling 2006-05-11 07:55:48 +00:00
Rasmus Lerdorf
839c3e24a3 MFB input filter hook for getenv() 2006-05-10 21:25:01 +00:00
Rasmus Lerdorf
2f537ad0ff MFB filter defines 2006-05-10 21:23:46 +00:00
Dmitry Stogov
736b8d903b Fixed bug #37276 (problems witch $_POST array) 2006-05-03 11:24:51 +00:00
Frank M. Kromann
e6e2754439 Remove ZSTR() from stream macros. Calling function must apply this macro 2006-04-28 19:03:58 +00:00
Antony Dovgal
8a434f5df0 merge fix for #37158 into HEAD
add test
2006-04-22 23:49:39 +00:00
Michael Wallner
54ff84d3d5 MFB: Fix reading stream filters never notified about EOF 2006-04-20 17:52:01 +00:00
Sara Golemon
d229fc9048 Fix copy/paste typo in php_stream_path_decode() proto 2006-04-18 19:09:31 +00:00
Dmitry Stogov
83657db8ff Fixed memory leaks 2006-04-18 06:58:54 +00:00
Antony Dovgal
78fdeb1acc fix CS and prevent NULL dereference 2006-04-13 18:14:14 +00:00
Sara Golemon
d05836890b Preserve full name of filter for use in stream_get_meta_data() 2006-04-13 04:41:08 +00:00
Sara Golemon
0b84c73635 Allow http:// wrapper to automatically apply correct unicode.from.* filter based on content-type header 2006-04-12 22:40:56 +00:00
Antony Dovgal
821aff2e9c MF51: fix #37053 (html_errors with internal classes produces wrong links) 2006-04-12 12:52:00 +00:00
foobar
b8cdb46cce - More safe_mode left-overs. 2006-04-11 11:32:06 +00:00
foobar
6af3218f81 more cleanup (lingering ini settings which do not exist anymore, etc.) 2006-04-10 15:09:15 +00:00
foobar
2442d71b16 - Silence some PCRE compile warnings 2006-04-10 11:54:54 +00:00
Andrei Zmievski
3411f2bca1 Separate suffixes of shared libraries that we link against and the ones
we load with dlopen(). This matters on Mac OS X, for example.
2006-04-08 17:34:57 +00:00
Dmitry Stogov
7a6284cef0 Optimization 2006-04-07 13:57:39 +00:00
Dmitry Stogov
e5d4bfd637 We don't need setup the same time-out two times. 2006-04-07 11:43:43 +00:00
Sara Golemon
3b35b15961 Do runtime conversions (with an E_NOTICE) on writing unicode data to a binary stream. Take the WTF out of the equation 2006-04-06 19:39:11 +00:00
Ilia Alshanetsky
ae08857016 Removed extra space in the Content-Type header for logos
Simplified stderr error reporting in apache sapi.
2006-04-02 17:58:07 +00:00
Sara Golemon
fd606a8d78 Add API hooks and unicode.filesystem_encoding for handling unicode
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.
2006-03-31 22:51:37 +00:00
Sara Golemon
51b9a0f269 Make php_stream_copy_to_mem() unicode aware and
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).
2006-03-30 00:22:51 +00:00
Sara Golemon
1c97a0d78c Update php_stream_passthru() to handle unicode data.
This updates userspace functions fpassthru() and readfile()

UG(output_encoding) is used by php_stream_passthru() to translate
unicode stream contents back to an outputable character set.

Note: readfile()'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 readfile() to output binary file
contents (default) or unicode transcoded contents (using FILE_TEXT flag).
2006-03-29 22:52:24 +00:00
Sara Golemon
30a2bd1d11 Another (and hopefully last) major streams commit.
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.
2006-03-29 01:20:43 +00:00
Antony Dovgal
d15557fb76 MF51: fix #36869 (memory leak in output buffering when using chunked output) 2006-03-27 08:26:20 +00:00
Andrei Zmievski
1709428494 Implement to-Unicode conversion error behavior. Note the adjusted APIs. 2006-03-26 06:19:24 +00:00
Andrei Zmievski
930bde5897 * Remove unicode.from_error_mode and unicode.from_subst_char from INI
settings.
* Add unicode_set_error_mode() and unicode_set_subst_char() functions to
  manipulate these global settings.
2006-03-26 01:48:33 +00:00
Sara Golemon
e883cee0b1 Handle converter instantiation errors properly 2006-03-25 04:37:44 +00:00
Andrei Zmievski
abf44bf9df This is probably not a test.. 2006-03-24 21:25:44 +00:00
Sara Golemon
0260dfc9b1 Hook into new unicode conversion error handling API 2006-03-24 20:21:48 +00:00
Sara Golemon
880dd406f2 Add php_stream_get_record_unicde() API call.
Update stream_get_line() userspace function to handle unicode streams.
2006-03-24 19:22:24 +00:00
Andrei Zmievski
19897a5f44 UTODO note 2006-03-24 00:25:49 +00:00
Sara Golemon
eb44e642b1 Add some error checking when stream converters are instantiated.
Use the global conversion error handlers for output conversion (for now)
We may want to make this customizable on a per-stream basis
via context param later on...
2006-03-24 00:19:39 +00:00
Sara Golemon
201d5df650 Allow grow_mode && !bufstart (original assertion logic) 2006-03-21 18:28:42 +00:00
Antony Dovgal
95d4ac09ca fix spelling 2006-03-21 13:46:51 +00:00
Dmitry Stogov
79c653ab98 Fixed bug #36809 (__FILE__ behavior changed) 2006-03-21 08:49:58 +00:00
Dmitry Stogov
00c81b0e49 Fixed register_argc_argv behavior. Now it behave in the same way as before in combinations with variables_order and auto_globals_jit.
$argc and $argv global variables are registered only in CLI mode and under $_SERVER[] in other case. (This is done because register_globals was removed and assumed - off).
2006-03-20 10:18:50 +00:00