1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00
Commit Graph

2631 Commits

Author SHA1 Message Date
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
Antony Dovgal a4f9c8efc2 MFB: first check stream for NULL, then dereference 2006-03-19 22:34:26 +00:00
Marcus Boerger 46bc026fb0 - Fix seek/eof issue in temp streams 2006-03-18 19:56:35 +00:00
Marcus Boerger d7a4909ed2 - Fix issue in _php_stream_get_line(): Allow maxchars == 0 as macro
php_stream_get_line() does
2006-03-18 19:44:51 +00:00
Andrei Zmievski a75b8f5f35 Fix compiler errors by using NULL_ZSTR where zstr is expected.
# I guess we need to use NULL_ZSTR instead of NULL when passing NULL to
# functions that expect zstr parameter.
2006-03-17 22:52:55 +00:00
Dmitry Stogov fb7324bb71 Fixed register_argc_argv 2006-03-17 15:04:23 +00:00
Dmitry Stogov 34c493ea07 Unicode support for dl() patch. 2006-03-17 13:45:43 +00:00
Dmitry Stogov c09bbfa2b8 Eliminated unnecessary getcwd() syscall 2006-03-17 10:46:02 +00:00
Dmitry Stogov 22a7b0c06e Allowed 'auto_globals_jit' work together with 'register_argc_argv' 2006-03-17 08:59:02 +00:00
Dmitry Stogov 86780519d4 Disabled dl(). Now it is enabled only when a SAPI layer registers it explicitly. Only CLI, CGI and EMBED do this. 2006-03-16 16:53:10 +00:00
Dmitry Stogov 9d7ca01c8b Dropped allow_call_time_pass_reference, the error is maden E_STRICT. 2006-03-16 11:32:00 +00:00
Dmitry Stogov 7c0e534157 Dropped zend.ze1_compatibility_mode 2006-03-16 10:33:23 +00:00
Dmitry Stogov 22055cb8fd Dropped register_long_arrays, added E_CORE for all dropped setting 2006-03-16 09:44:42 +00:00
Marcus Boerger 6380908706 - Fix warning 2006-03-16 00:53:58 +00:00
Sara Golemon 1eca7b87d1 Fix improper byte count on partial reads 2006-03-15 21:18:36 +00:00
Sara Golemon df77705572 Switch (zstr) casts to use ZSTR() macro. 2006-03-15 00:28:57 +00:00