Dmitry Stogov
b71309f4a2
Removed unnecessary checks for ISREG file and corresponding stat() calls on Wind
...
ows
2006-11-10 10:55:43 +00:00
Dmitry Stogov
dc34d34230
Simplify the code base as this getpwd() was used only once
2006-11-10 09:56:37 +00:00
Antony Dovgal
e2070c4360
eliminate a couple of compile warnings
2006-11-09 01:06:45 +00:00
Rasmus Lerdorf
d566d5553f
Mark memory streams as is_url
2006-11-04 20:44:02 +00:00
Johannes Schlüter
823681aaa0
- Fix merging of $_REQUEST in unicode mode and remove $GLOBALS check from
...
register_globals times
2006-10-21 10:01:39 +00:00
Dmitry Stogov
d73bf1d322
Fixed mkdir("/tmp/foo//bar/log", 0777, true)
2006-10-19 09:49:56 +00:00
Sara Golemon
be5debc65a
Extend open_basedir functionality to allow runtime tightening
2006-10-17 21:54:17 +00:00
Ilia Alshanetsky
bec31fe85a
MFB: main/php_open_temporary_file.c
2006-10-13 01:11:45 +00:00
Michael Wallner
9de590ecf1
- use new zend_fcall_info API
...
- use enums where appropriate
2006-10-12 12:50:29 +00:00
Sara Golemon
d9423de12e
Bugfix 38648: Don't assume all buckets are part of a brigade
2006-10-11 23:07:30 +00:00
Antony Dovgal
729ed6eafc
fix crash when parsing invalid hostnames/IPs
2006-10-11 12:53:38 +00:00
Hannes Magnusson
176b72284c
Error message clean up
...
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00
Antony Dovgal
d38bf75b69
int -> size_t
2006-10-03 23:22:21 +00:00
Michael Wallner
99fe9133c1
- typo
2006-10-03 22:28:33 +00:00
Michael Wallner
32186c45fb
- fix failure with tests/lang/bug23489.phpt
...
- allocate fci param space at once with php_output_handler_user_func_t
2006-10-03 22:20:28 +00:00
Ilia Alshanetsky
15e5832c26
MFB: Last set of zend_hash_init() optimizations
2006-10-03 19:52:34 +00:00
Sara Golemon
d666c05427
PHP6 Update for get_included_files() and export of path decode for Zend
2006-10-03 16:28:02 +00:00
Michael Wallner
ea0f299bad
- use fci/fcc instead of zval* for user ob handler
2006-10-03 08:15:44 +00:00
Sara Golemon
fa71abf4a2
Unused label, now how the heck did it get there?
2006-10-02 18:13:56 +00:00
Sara Golemon
e321287b4f
Try out simplified API for encoding paths/filenames
2006-10-02 02:24:29 +00:00
Antony Dovgal
500dd0ac79
fix compile warning
2006-09-28 08:26:19 +00:00
Dmitry Stogov
eb1e643690
Fixed wrong pipe detection code
2006-09-28 07:26:19 +00:00
Ilia Alshanetsky
1af5f8cd39
MFB: Fixed bug #38963 (Fixed a possible open_basedir bypass in tempnam()).
2006-09-27 23:44:34 +00:00
Ilia Alshanetsky
13e1309f40
MFB: Fixed bug #38904 (apache2filter changes cwd to /).
2006-09-25 14:49:34 +00:00
Sara Golemon
f8fdb67056
PHP6 Updates for popen() and related functionality
2006-09-24 20:33:14 +00:00
Sara Golemon
3191ed0e85
Update stream_copy_to_stream() for PHP6
2006-09-22 19:54:30 +00:00
Sara Golemon
3f56da6eba
Add INI controlled default stream encoding (unicode.stream_encoding).
...
Add convenience function stream_defualt_encoding() for setting it.
2006-09-19 20:36:48 +00:00
Dmitry Stogov
128548a5c0
Disabled autoconversion of hash keys (from string to unicode) for PHP arrays
2006-09-19 10:38:31 +00:00
Ilia Alshanetsky
a3a3cc7546
MFB: Avoid generating php_errormsg twice in some instances.
2006-09-18 23:11:01 +00:00
Antony Dovgal
e264e460a4
fix double free(), add test
2006-09-15 07:26:19 +00:00
Dmitry Stogov
a9f035d5c1
*** empty log message ***
2006-09-14 09:59:23 +00:00
Ilia Alshanetsky
504078c64e
MFB: Fixed bug #37779 (empty include_path leads to search for files
...
inside /).
2006-09-12 15:49:02 +00:00
Sara Golemon
1ce3ba599b
Bug #38687 - sockaddr local storage insufficient for all sock families
2006-09-11 19:18:06 +00:00
Antony Dovgal
d13d452523
fix coverity issue #197
...
"I can't think of a reason to pass a NULL buf" (c) Wez
2006-09-10 13:01:28 +00:00
Edin Kadribasic
b279fe502a
MFB
2006-09-05 11:55:08 +00:00
Dmitry Stogov
9a06a517d6
Fixed VIRTUAL_DIR inconsistency
2006-09-04 08:18:35 +00:00
Ilia Alshanetsky
22206ebf22
MFB: Fixed bug #38661 (mixed-case URL breaks url-wrappers).
2006-09-03 16:33:02 +00:00
Michael Wallner
df26ea87bd
- output handler alias ctor should know about chunk_size and flags
2006-08-31 13:51:35 +00:00
Michael Wallner
d83fdc677f
- fix PHP_OUTPUT_CONFLICT macro
2006-08-30 22:34:32 +00:00
Michael Wallner
e62c35f141
- add PHP_OUTPUT_WRITTEN and PHP_OUTPUT_SENT status flags
2006-08-30 14:42:01 +00:00
Michael Wallner
2dc5f6de5d
- the Vary header for zlib.output_compression is now handled inside the output handler
2006-08-30 12:25:56 +00:00
Michael Wallner
0eef1208c2
- output handler may modify context->op
...
- discard any context->out.data on failure
2006-08-30 12:06:22 +00:00
Michael Wallner
7947beb75a
- revise output handler alias API
...
- add convenience macros for conflicts and aliases
- generalize flags to php_output_stack_pop()
- mark the handler as started *after* run
- handler should still be flushable after marking it immutable
2006-08-30 07:39:09 +00:00
Antony Dovgal
144cca7be3
fix #38199 (fclose() unable to close STDOUT and STDERR)
2006-08-28 17:14:13 +00:00
Andrei Zmievski
f4a5e50069
MFB
2006-08-23 20:39:37 +00:00
Michael Wallner
53ca648bb5
- fix php_output_handler_started()
2006-08-22 09:56:24 +00:00
Michael Wallner
31632b3458
- use the handler name zval directly when listing stati, too
2006-08-22 08:21:19 +00:00
Michael Wallner
0ff7bc29d9
- fix tests to comply with upgraded string.c
...
- use add_next_index_zval() when listing handlers
2006-08-22 08:16:37 +00:00
Michael Wallner
139f6ff79d
- allocate handler stack on the heap and avoid segfaults on shutdown when startup fails
...
- don't try to append empty buffer
- fix some dbg format strings
2006-08-22 07:53:58 +00:00
Dmitry Stogov
d824f02ce1
Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)
2006-08-22 06:15:45 +00:00
Ilia Alshanetsky
2ae992d772
MFB: Increased default memory limit to 16 megabytes to accommodate for a
...
more accurate memory utilization measurement.
2006-08-17 13:43:51 +00:00
Antony Dovgal
a4a561dc72
fix #38450 (constructor is not called for classes used in userspace stream wrappers)
2006-08-14 15:00:04 +00:00
Nuno Lopes
5897477522
MFH: const/static keywording
2006-08-12 19:41:28 +00:00
Michael Wallner
de93f1dc91
- error message enhancements
...
- avoid duplicate error messages
- add PHP_OUTPUT_HANDLER_FLUSHABLE
- add PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL
- add more tests
2006-08-09 13:56:45 +00:00
Michael Wallner
6e54e763ae
- mark unicode safe functions
2006-08-09 10:57:46 +00:00
Michael Wallner
f5949edfe9
- use HashPosition for traversal of registered reverse conflicts
...
- fix protos
2006-08-09 10:21:10 +00:00
Antony Dovgal
2c946984da
unused variable
2006-08-08 17:05:14 +00:00
Antony Dovgal
dbe2092313
implement zend_unicode_to_string() and zend_string_to_unicode()
...
part #2 (of 2)
2006-08-08 16:59:11 +00:00
Dmitry Stogov
a0f7f6680a
In addtion to path to php.ini, PHPRC now may specify full file name
2006-08-03 11:05:09 +00:00
Ilia Alshanetsky
d2579f9dd1
MFB: Fixed bug #38236 (Binary data gets corrupted on multipart/formdata
...
POST).
2006-07-27 17:14:24 +00:00
foobar
95f2db2459
- Removed unnecessary quotes
2006-07-27 08:52:10 +00:00
foobar
f0fe4e05b9
- Added PHP_VERSION_ID == PHP_VERSION as integer value.
2006-07-27 08:50:41 +00:00
Michael Wallner
73ba3e2592
- added error_get_last() function
2006-07-19 12:25:02 +00:00
Dmitry Stogov
6687f0377b
New memory manager
2006-07-18 09:08:06 +00:00
Dmitry Stogov
14bb973768
Fixed memory leaks in ZTS mode
2006-07-17 07:20:28 +00:00
Sara Golemon
2ef3bb9cb8
Logic fix: (!a == b) != (a != b)
2006-07-14 22:24:07 +00:00
Sara Golemon
eb634dfa84
#38105 (2/3) Filters should report char/UChar count, not bytes
2006-07-14 19:15:31 +00:00
Sara Golemon
aea4195ac6
#38105 (1/3) Backward logic, filter_product == IS_STRING means the wrapper HAS applied pre-filtering
2006-07-14 19:14:40 +00:00
Antony Dovgal
87d846c2cb
initialize variables
2006-07-13 17:55:50 +00:00
Antony Dovgal
f7f468863a
fix build
2006-07-13 17:02:43 +00:00
Ilia Alshanetsky
e49961c935
MFB: Fixed compiler warnings.
2006-07-13 15:05:42 +00:00
Antony Dovgal
68bd430a63
fix C++ comments in C code and comment out unused variable
2006-07-13 12:17:25 +00:00
Antony Dovgal
12f44c2b2b
fix #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the actual length)
2006-07-13 11:58:42 +00:00
Andrei Zmievski
ed77c07a35
Commit Sara's patch for supporting filesystem enccoding in
...
include/require.
2006-07-12 17:04:13 +00:00
Nuno Lopes
62338cfeb8
static+const keywords
2006-07-07 23:28:23 +00:00
Dmitry Stogov
a72dd9fe17
Changed priority of PHPRC environment variable on win32 to be higher then value from registry.
2006-07-04 06:38:32 +00:00
Nuno Lopes
c2b1be3549
MFB5.2: const keywording
2006-07-01 11:50:52 +00:00
Hannes Magnusson
b9c078acf4
url->URL
2006-06-29 14:42:30 +00:00
Andrei Zmievski
e875205714
Implement user conversion error handler support. Works as normal error
...
handler, in that it can return false to make the default one take over.
Handler signature is:
user_handler($direction, $encoding, $char_byte, $offset, $message)
Also removed support for using exceptions in default error handler.
2006-06-21 20:17:21 +00:00
Andrei Zmievski
9573e77249
Typos.
2006-06-21 17:10:13 +00:00
Hannes Magnusson
64ce1969c9
Plug memleak (leaks on empty files)
2006-06-20 18:09:33 +00:00
Dmitry Stogov
943960c324
Added automatic module globals management
2006-06-13 13:12:20 +00:00
Michael Wallner
cf914cc0a7
- don't use anonymous union
2006-06-12 18:18:39 +00:00
Michael Wallner
773fa96dfc
- fix SEGV in php_output_handler_started()
2006-06-06 22:13:23 +00:00
Antony Dovgal
7a9ad25d8c
don't leak when decoding failed
2006-06-06 14:08:47 +00:00
Michael Wallner
0fe565293f
- fix regression with bug #22690 (ob_start() with create_function() output handler)
2006-06-06 11:08:45 +00:00
Antony Dovgal
99e0a6f3d6
no need to check if non-existing include_path complies with open_basedir setting
...
the only result we can get is segfault
2006-06-05 22:39:10 +00:00
Edin Kadribasic
19787d38e9
MFB
2006-06-05 22:23:39 +00:00
Michael Wallner
af012fd916
- fix output handler seeing buffered data when it gets discarded
...
- add test
2006-06-04 10:01:58 +00:00
Michael Wallner
4de156baa2
- remove obsolete cruft
2006-06-03 11:51:35 +00:00
Michael Wallner
231ad17475
- explicit usage of TS macros
...
# this could have been raised a lot earlier
2006-06-03 11:19:44 +00:00
Michael Wallner
4ce0141713
- new output control code
...
# scan README.NEW-OUTPUT-API to get a grasp
# tree has been tagged with BEFORE_NEW_OUTPUT_API
#
# TODO:
# - improve existing output handlers
# - move zlib.output_compression cruft from SAPI.c to zlib.c
# - output_encoding handling was ambigious, resp. is undefined yet
# - more tests
2006-06-02 19:51:43 +00:00
Andrei Zmievski
7a14d10fe4
MFB
2006-05-31 17:19:05 +00:00
Johannes Schlüter
3d2ddf524e
- nitpicking "PHP6" vs. "PHP 6"
2006-05-27 20:53:38 +00:00
Edin Kadribasic
4eab123723
MFB: Missing definition, patch by Steph Fox
2006-05-25 18:48:30 +00:00
Edin Kadribasic
7d605c31d1
MFB: Initialize windows globals, fixes #37428
2006-05-24 22:00:57 +00:00
Ilia Alshanetsky
45b278cc34
MFB: Fixed handling of extremely long paths inside tempnam() function.
2006-05-23 23:22:16 +00:00
Marcus Boerger
25d5adec0d
- Fix feof() with temp/memory streams
2006-05-23 22:26:23 +00:00
Marcus Boerger
a4d6c5a6f0
- Handle corrupt base64 data in data: url
2006-05-21 13:35:06 +00:00
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
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
Sara Golemon
b576354982
More stream updates.
...
fgets() will work now as will anything which calls one of the
_php_stream_get_line() family of functions.
The one exception here is when the legacy defines are used on a unicode
stream. At the moment they'll simply return NULL, I'll update these
to do sloppy conversion in a bit.
'make (u)test' still doesn't work, but it's a different doesn't work.
2006-03-14 21:15:05 +00:00
Dmitry Stogov
e4aa6e302e
Fixed bug #35988 (Unknown persistent list entry type in module shutdown)
2006-03-14 15:16:27 +00:00
Sara Golemon
04df7e3bdc
Make php_stream_write_buffer() return characters written, not bytes
2006-03-13 20:54:06 +00:00
Derick Rethans
f7bfe18307
This makes file_put_contents() work for:
...
<?php
declare(encoding="latin1");
$a = "1234å67890";
file_put_contents( "/tmp/testuc.1", $a);
file_put_contents( "/tmp/testuc.2", (string) $a);
$context = stream_context_create();
stream_context_set_params($context, array( "output_encoding" => "latin1" ) );
file_put_contents( "/tmp/testuc.3", $a, FILE_TEXT, $context);
file_put_contents( "/tmp/testuc.4", (string) $a, FILE_TEXT, $context);
?>
But it still throws a warning on ".3". It's a small design issue that I
didn't want to touch right now.
2006-03-13 15:01:44 +00:00
Dmitry Stogov
c23806d331
Fixed realpath() cache for main script with FastCGI SAPI
2006-03-13 09:36:05 +00:00
Sara Golemon
48798021b5
Refactor streams layer for PHP6.
...
Don't be frightened by the size of this commit.
A significant portion of it is restoring the read buffer semantics back
to what PHP4/5 use. (Or a close aproximation thereof).
See main/streams/streams.c and ext/standard/file.c for a set of
UTODO comments covering work yet to be done.
2006-03-13 04:40:11 +00:00
Brian France
43b75c6ab4
for the primary file only lookup the real file path and
...
add it to the included_files list if already opened
otherwise it will get opened and added to the included_files list in zend_execute_scripts
2006-03-10 18:16:24 +00:00
Sara Golemon
5c7826716b
Move temporary local storage of primary file's realpath up one block to ensure it stays on the stack.
2006-03-09 20:31:58 +00:00
Ilia Alshanetsky
27e175eef0
So long safe_mode mode.
...
Also removed the magic_quotes configure option, no longer relevant since
the magic is gone :-).
2006-03-08 14:41:45 +00:00
Pierre Joye
bb1ec86f9d
- remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
...
(calling ini_set('magic_....') returns 0|false
- get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false
- set_magic_quotes_runtime raises an E_CORE_ERROR
2006-03-08 00:43:32 +00:00
Alex Waugh
b7d6d705f1
Fix for RISC OS
2006-03-07 22:37:18 +00:00
Colin Viebrock
f8448b426d
change these in HEAD too
2006-03-07 16:47:19 +00:00
Pierre Joye
303bfea78f
- remove register_globals support (aka "Kill the f***ing thing" :)
2006-03-07 00:20:54 +00:00
Dmitry Stogov
c366cc6d1a
Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings
2006-03-02 13:12:45 +00:00
Marcus Boerger
56ec57c614
- If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error
2006-02-28 18:00:03 +00:00
Marcus Boerger
6531669e4e
- Cleanup
2006-02-28 12:06:54 +00:00
Dmitry Stogov
e3b7f3fd0d
Unicode support: MS Visual C compatibility
2006-02-26 11:57:14 +00:00
Marcus Boerger
9845606cef
- Add deprecation function/function alias macros
2006-02-24 13:30:21 +00:00
Dmitry Stogov
0f1209ab3d
Portable unicode string API:
...
- use the same type (int) for zval.value.usr.len and zval.value.str.len
- use union "zstr" as char*/UChar* mixture instead of void*
- Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
- nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Andi Gutmans
1efe984d08
- Get rid of using ENFORCE_SAFE_MODE.
2006-02-19 04:29:42 +00:00
Andi Gutmans
8f126f33ac
- Fix according to Sara's reply
2006-02-19 03:41:25 +00:00
Andi Gutmans
d3f7bee047
Nuke php_check_safe_mode_include_dir
2006-02-19 01:19:37 +00:00
Andi Gutmans
e3b1e8c5dd
- Some more safe_mode nuking
2006-02-19 01:10:13 +00:00
Dmitry Stogov
6da04e6292
pval -> zval (Steph)
2006-02-13 16:35:36 +00:00
Dmitry Stogov
b238135d53
Fixed bug #36205 (Memory leaks on duplicate cookies)
2006-02-13 12:18:31 +00:00
Dmitry Stogov
09ca61c125
Made server wide switch for unicode on/off (according to PDM).
2006-02-13 10:23:59 +00:00
Dmitry Stogov
558e883302
Fixed bug #36268 (Object destructors called even after fatal errors)
2006-02-03 09:33:31 +00:00
Sara Golemon
ff87d57268
Prevent bindport from being used uninitialized
2006-02-02 18:16:25 +00:00
Joe Orton
af6dd5cb7e
Fixed bug #36208 (symbol namespace conflicts using bundled gd). (Jakub Moc)
2006-02-01 13:10:04 +00:00
Marcus Boerger
a372669d4a
- Fixed Bug #35978 %n format string specifier wrongly implemented
2006-01-24 20:57:56 +00:00
Dmitry Stogov
227295a4f1
Unicode stuff is changed according to decision maden on PDM.
...
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00
Ilia Alshanetsky
1204ea0e63
MFB51: Only report mkdir() errors if error reporting option is set.
2006-01-17 02:32:34 +00:00
Antony Dovgal
07ff99a075
fix bug #35999 (recursive mkdir() does not work with relative path like "foo/bar")
2006-01-16 19:47:07 +00:00
Dmitry Stogov
7e5b53c2b3
Fixed bug #36016 (realpath cache memleaks)
2006-01-16 09:17:50 +00:00
Marcus Boerger
095c66e715
- Fix two warnings
...
# Here fixing warnings reveals that it often enough means fixing errors
2006-01-12 19:21:36 +00:00
Marcus Boerger
d6e15bf75e
- Fix warning
2006-01-12 19:13:50 +00:00
Ilia Alshanetsky
d2397a9301
MFB51: Fixed bug #35916 (Duplicate calls to stream_bucket_append() lead to
...
a crash).
2006-01-10 16:14:45 +00:00
Marcus Boerger
71af00ec47
- Fix issue with memset seeking
...
- Fix issue with shutdown order of temp/memory stream
2006-01-05 22:05:44 +00:00
foobar
251c5173fd
bump year and license version
2006-01-01 13:10:10 +00:00
foobar
2b1085d103
fix typo
2005-12-30 05:39:38 +00:00
Marcus Boerger
3563b7d571
- Support full range of floats
2005-12-26 14:46:34 +00:00
Marcus Boerger
27986dbc88
- Fix memory corruption in s*printf() (see bug #27678 )
2005-12-26 13:39:17 +00:00
Antony Dovgal
1c7661a301
MFB: fix #35781 (stream_filter_append() can cause segfault)
2005-12-23 15:05:42 +00:00
Ilia Alshanetsky
ec58b74d7f
MFB51: Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any
...
string greater then 255 characters).
2005-12-20 14:27:04 +00:00
Antony Dovgal
3a14188725
MFB: fix #35740 (memory leak when including a directory)
2005-12-20 09:48:24 +00:00
Dmitry Stogov
52a9d56185
Fixed memory overflow, because usage of initialized value
2005-12-07 09:00:29 +00:00
Ilia Alshanetsky
112f016a39
MFB51: Better critical error handling (fix for previous html encoding patch).
2005-12-07 02:37:35 +00:00
Ilia Alshanetsky
f0191491f2
MFB51: Fixed bug #30760 (Remove MessageBox on win32 for E_CORE errors if
...
display_startup_error is off).
2005-12-06 23:32:27 +00:00
Ilia Alshanetsky
a4861d1512
Prevent header injection by limiting each header to a single line.
2005-12-06 03:39:26 +00:00
Ilia Alshanetsky
2d789c2366
MFB51: Fixed possible XSS inside error reporting functionality.
2005-12-06 03:13:53 +00:00
foobar
1c0ece7149
- nuke php3 legacy
2005-12-06 01:04:42 +00:00
foobar
8fa72be4ee
- Nuke php3_compat.h
2005-12-06 00:44:22 +00:00
foobar
34ad5ab731
- list_entry -> zend_rsrc_list_entry
2005-12-05 23:31:09 +00:00
foobar
d2e3d9c244
fix compile failure (bug #35528 )
2005-12-03 01:21:09 +00:00
Ilia Alshanetsky
6407b345b9
MFB51: Fixed bug #35170 (PHP_AUTH_DIGEST differs under Apache 1.x and 2.x)
2005-11-25 00:07:57 +00:00
Rasmus Lerdorf
e1f1857978
Add allow_url_include to let people turn on allow_url_fopen without also
...
enabling remote code execution through url wrappers
2005-11-18 16:20:43 +00:00
Antony Dovgal
a5e2f63d68
fix #35079 (stream_set_blocking(true) toggles, not enables blocking)
...
patch by askalski at gmail dot com
2005-11-17 14:19:06 +00:00
Dmitry Stogov
1f98519ac4
Fixed bug #35176 (include()/require()/*_once() produce wrong error messages about main())
2005-11-15 11:14:34 +00:00
Andrei Zmievski
87e782644b
Grr. Re-re-fix the fix.
2005-11-12 11:11:53 +00:00
Andrei Zmievski
0593d4a41d
Re-fix Marcus's fix.
2005-11-11 17:34:16 +00:00
Marcus Boerger
802fa95416
- Fix build
2005-11-11 16:50:08 +00:00
foobar
8c633a099f
- Revert bad patch. This is wrong way to handle leak in "php -m"
2005-11-06 22:07:12 +00:00
Michael Wallner
ab95f1981c
- sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP response splitting
...
- sapi_send_headers() already takes care of default_content_type (left over of fix for bug #29983 )
2005-11-02 14:27:02 +00:00
Ilia Alshanetsky
c1a09f6399
MFB51: Fixed minor memory leak triggered by: -dzlib.output_compression=1 -m
2005-11-01 23:02:52 +00:00
Marcus Boerger
2e67d648fc
- WS: Make function detection work in my editor
2005-11-01 11:12:27 +00:00
Marcus Boerger
7c25bdfe67
- Fix mode handling
2005-10-30 17:17:44 +00:00
Wez Furlong
58f42f04ad
merge VCWD_ACCESS bugfix to head.
...
Test suite is unusable in HEAD, so I guess it works here too.
2005-10-22 17:26:16 +00:00
Ilia Alshanetsky
50686f4d7c
Fixed bug #29983 (PHP does not explicitly set mime type & charset).
2005-10-19 20:30:38 +00:00
Rob Richards
551d6c5505
PHP_CONFIG_FILE_PATH needs to use strlen() due to Win build
2005-10-10 02:26:13 +00:00
Marcus Boerger
8217f84488
- C vs. C++ fix
...
# I do too much C++ and too much languages anyway, right now actively:
# C, C++, Java, PHP, Peral
2005-10-07 07:37:37 +00:00
Marcus Boerger
a27f5b0665
- Fix issue (endless loop) with temp/memory streams
2005-10-06 21:30:56 +00:00
Antony Dovgal
5e72a7c750
fix fwrite() and fgets() in unicode mode
2005-10-05 21:46:28 +00:00
Antony Dovgal
6f4fe0e7ff
fix bugs #34743 & #34118 (fseek/fread unicode related problems in HEAD)
...
patch by Alex
2005-10-05 17:18:06 +00:00
Ilia Alshanetsky
146517684d
Fixed possible GLOBALS variable override when register_globals are ON.
...
Fixed possible register_globals toggle via parse_str().
2005-09-28 22:31:29 +00:00
Andrei Zmievski
34308558ac
Unicode fixes.
2005-09-27 17:50:00 +00:00
Ilia Alshanetsky
6d2e7a84ca
Fixed bug #32937 (open_basedir looses trailing / in the limiter).
...
Patch by Adam Conrad
2005-09-27 15:07:38 +00:00
Derick Rethans
74929f352c
- Fixed bug #34052 (date('U') returns %ld not unix timestamp).
2005-09-15 19:10:13 +00:00
Derick Rethans
0f391bb0b3
- Add E_RECOVERABLE.
...
#- Thought I did this before already actually...
2005-09-15 16:19:48 +00:00
foobar
7d92b356d9
revert
2005-09-02 14:08:09 +00:00
foobar
1496355faf
MFB: Always return something, even if it succeeds :)
2005-09-02 08:26:05 +00:00
Ilia Alshanetsky
5f1aa243c3
Fixed bug #34331 (php crashes when variables_order is empty).
2005-09-01 19:14:54 +00:00
foobar
ec0b4f91f4
- Fixed bug #34307 (OnUpdateStringUnempty INI options can be set as empty)
2005-09-01 14:42:54 +00:00
Andrei Zmievski
674469245f
Further work on Unicode support in file uploads.
2005-08-31 20:42:14 +00:00
Dmitry Stogov
7999c0c3d4
Fixed SIGSEGV
2005-08-29 06:51:51 +00:00
Derick Rethans
cdcf566a21
- Fixed a bug where stream_get_meta_data() did not return the "uri" element for
...
files opened with tmpname().
2005-08-26 12:50:06 +00:00
Ilia Alshanetsky
0408e53679
Remainder of the 34191 bug fix.
2005-08-24 16:19:47 +00:00
Derick Rethans
377c3b3584
- Fixed another little buglet in the spprintf() formatters.
2005-08-23 06:48:55 +00:00
Dmitry Stogov
83bd44f1fd
Don't apply "unicode" filters in non-unicode mode
2005-08-22 14:48:25 +00:00
Dmitry Stogov
6b622046dc
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
2005-08-22 12:22:16 +00:00
Dmitry Stogov
0f026c9fb7
Unicode support
2005-08-18 10:18:40 +00:00
foobar
5cf36ea50f
Fix EOLs under winblows
2005-08-17 07:52:17 +00:00
Marcus Boerger
a5f023a829
- Prevent E_STRICT from ending up as exception
2005-08-16 18:09:27 +00:00
Derick Rethans
1ee41e0d92
- Fixed a couple of bugs in the new smart_str macros, and allow them to
...
allocate two extra bytes (so that we can pad them with two \0's for UTF-16)
- Fixed usage of smart_str's in the PAD and INS_STRING macros.
2005-08-16 18:02:41 +00:00
foobar
f8e4528a3d
These are not defined anymore
2005-08-15 22:31:59 +00:00
foobar
077e356572
Goodbye PEAR
2005-08-15 22:30:40 +00:00
Dmitry Stogov
fbf8880292
Fixed var_dump() identation bug
2005-08-15 07:19:10 +00:00
Marcus Boerger
b7e23d00c6
- Need to terminate [v]uspprintf() with two \0
2005-08-14 21:04:52 +00:00
Marcus Boerger
5e298240d6
- Where did my backslash vanish?
2005-08-14 20:12:51 +00:00
Marcus Boerger
d0c6d77b9e
- Handle different cases of the actual strings correctly
2005-08-14 20:11:05 +00:00
Marcus Boerger
8b9c131f55
- Initial support of easy way to generate unicode strings: [v]uspprinf()
...
# Same semantics as [v]spprintf, only it prints unicode strings instead of
# native strings. Atm it has a little problem since it length doesn't take
# the difference between UTF-16 code points vs units into account. But as
# long as no 4 byte codes are involved it should already run everything.
2005-08-14 17:14:42 +00:00
Wez Furlong
7d44da10b6
tidy up implicit_mode handling; spotted by Nuno
...
There's probably a much more efficient way to do this than the current strchr stuff.
2005-08-14 13:48:29 +00:00
Wez Furlong
b282b4d1ec
a bit of pedantic ws
2005-08-13 19:22:03 +00:00
Antony Dovgal
6bd0350af8
make valgrind and gcc happy
2005-08-12 23:21:29 +00:00
Antony Dovgal
b40db3bcb8
allow default_charset & default_mimetype to be changed during runtime
2005-08-12 21:46:14 +00:00
Dmitry Stogov
239f84c215
Fixed incorrect variable parsing in non-unicode mode
2005-08-12 13:27:38 +00:00
Andrei Zmievski
264cec8be6
Unicode support.
2005-08-11 23:36:07 +00:00
Rasmus Lerdorf
c95107492d
MFB minor consistency cleanup
2005-08-10 23:35:51 +00:00
Derick Rethans
8f43323dee
- Changing the API numbers, which might be a bit premature, but it allows
...
to differentiate between different branches.
- Bumbed the version number to 6.0.0-dev. I know we didn't discuss this yet,
but I feel it should be 6.0. See mail to the mailinglist.
2005-08-09 08:47:58 +00:00
foobar
000a9e3015
- Fixed problem with -dextension=foobar.so not having it's MINIT run.
2005-08-08 16:49:44 +00:00
Hartmut Holzgraefe
47ae4b0cb9
typo fix
2005-08-07 15:13:50 +00:00
foobar
8864ad2606
- This ini option is only effective when set in php.ini or httpd.conf
...
or .htacces, etc. as GPC variables are set before any ini_set() is called
2005-08-05 21:44:26 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
990f7043d9
Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash)
2005-08-02 17:01:05 +00:00
Ilia Alshanetsky
22db404132
Fixed bug #33904 (input array keys being escaped when magic quotes is off).
2005-07-29 15:43:37 +00:00
foobar
f66d5f0cc5
- Fixed few logic errors in php*.ini search path creation as documented here:
...
http://fi.php.net/manual/en/configuration.php#configuration.file
#
# Before this patch:
#
# $ strace php -r 'echo 1;' 2>&1 | grep php.ini
# open("/www/php/lib/php.ini", O_RDONLY) = 3
# lstat64("/www/php/lib/php.ini", {st_mode=S_IFREG|0640, st_size=46264, ...}) = 0
#
# With this patch:
#
# $ strace php -r 'echo 1;' 2>&1 | grep php.ini
# open("./php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
# open("/usr/src/php5_1_full/sapi/cli/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
# open("/www/php/lib/php.ini", O_RDONLY) = 3
# lstat64("/www/php/lib/php.ini", {st_mode=S_IFREG|0640, st_size=46264, ...}) = 0
#
2005-07-29 14:29:27 +00:00
Antony Dovgal
98694f919c
ws fix
2005-07-27 15:16:14 +00:00
Hartmut Holzgraefe
882cb200cc
edge case: do not remove trailing slash for root directory (Bug #33882 )
2005-07-27 15:13:50 +00:00
Hartmut Holzgraefe
7e071d9a1f
php.ini search logic needs to use the absolute path of the running binary
...
when looking for php.ini in the directory the php binary is installed in
2005-07-27 15:12:18 +00:00
Anantha Kesari H Y
a29793c4d2
NetWare can make use of autoconf based build
...
--Kamesh
2005-07-26 13:12:02 +00:00
Rasmus Lerdorf
c35454440c
I could have sworn I committed this a while ago. Just a tiny NULL safety
...
check here.
2005-07-25 22:37:35 +00:00
Wez Furlong
27c24383ee
revert my last change; chasing ghosts.
...
# the lesson is, ensure that php4 and php5 aren't loaded at the same time
2005-07-19 19:25:33 +00:00
Wez Furlong
546418a66b
Don't crash when no treat_data method has been set in the sapi module
...
# how come no one ran into this before?
2005-07-19 18:59:46 +00:00
Ilia Alshanetsky
e77c65f081
Revert cookie patch for BC reasons.
2005-07-18 19:18:03 +00:00
Dmitry Stogov
70bd938bbd
Fixed bug in new module statrup mechanism
2005-07-18 16:20:08 +00:00
Wez Furlong
8c57c3a9fe
compile before commit (gah!)
2005-07-18 14:12:52 +00:00
Wez Furlong
c4ba9edd57
Apparently our pipe detection code just above this isn't foolproof.
...
Catch it here.
2005-07-18 13:28:24 +00:00
Ilia Alshanetsky
75e6dd1c61
Fixed handling of HTTP requests with multiple Cookie headers.
2005-07-18 04:04:18 +00:00
Marcus Boerger
7316ee0399
- Fix problem with debug mode on selective machines
2005-07-17 18:39:24 +00:00
Anantha Kesari H Y
d77acff66f
main/fopen_wrappers.c
...
NetWare file names are case insensitive
main/main.c
NetWare has no sendmail binary. It uses the smart host mailing code avaiolable in php distro. Could not find a better place to put this than main/main.c.
-- Kamesh
2005-07-16 12:21:34 +00:00
Andi Gutmans
bdf2753ee8
- Back to -dev
2005-07-14 14:01:02 +00:00
Andi Gutmans
a007ddb190
- Beta 3
2005-07-14 13:44:03 +00:00
foobar
ec940d4d5a
- Fixed cacheing bug in PHP_SOCKADDR_SA_LEN macro
...
- Removed duplicate sa_len check from configure.in
- Unified the sockaddr tests into PHP_SOCKADDR_CHECKS macro
2005-07-14 00:12:26 +00:00
Ilia Alshanetsky
85e237888c
Fixed bug #33673 (Added detection for partially uploaded files).
2005-07-13 20:44:08 +00:00
Andi Gutmans
f030fe2f3a
- Back to -dev
2005-07-12 20:25:28 +00:00
Andi Gutmans
897818e1a0
- Beta 3
2005-07-12 19:59:52 +00:00
Ilia Alshanetsky
0131b2b032
Fixed double-free in the digest authentication handling.
...
# Found and Reported by Stefan Esser
2005-07-12 16:53:30 +00:00