Commit Graph

2943 Commits

Author SHA1 Message Date
Ilia Alshanetsky
3e5bbba351 Fixed a memory corruption that occurs when an unterminated " is encountered
this bug maybe be related to #21556.
2003-01-09 22:49:18 +00:00
Sara Golemon
4d789b593f Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist.
Extended php_checkuid function to add "flags" field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown.
2003-01-09 21:57:45 +00:00
Wez Furlong
59e4fdcc10 Implement fprintf() and vfprintf().
Add a couple of tests.
2003-01-09 17:29:31 +00:00
Wez Furlong
d8fbd1acef Fix Bug #21523 - number_format could cause a memory allocation for a
negative memory size in situations where the sprintf implementation of the
host system generated less decimal places than were requested.

Resolved this issue by making number_format examine the string returned
by spprintf and have it pad to the correct number of decimal places.

Added a test-case based on the bug report; the length of decimal places
required to trigger this bug is sprintf implementation dependent; as the
implementation is now using spprintf (provided by PHP), that number is
78 digits (NDIG - 2).

# I played with the idea of enhancing sprintf to do the equivalent, but
# it was too much effort considering that the precision of floats/doubles
# is not good enough to warrant it.

# This fix could do with some QA from someone else to make sure there are
# no memory bounds problems and then MFH it to PHP_4_3
2003-01-09 15:44:49 +00:00
Ilia Alshanetsky
ef9ba94c8b Fixed bug #21529 (memory corruption by fsockopen()). 2003-01-09 03:33:15 +00:00
foobar
66fd5008ab Fix the ZTS build. 2003-01-09 00:15:33 +00:00
Moriyoshi Koizumi
59393ef3ad Reimplemented base64 filter to use iconv()-like facility for flexibility.
# I'm leaving the code dirty & ugly prior to the discussion.
2003-01-08 23:44:38 +00:00
Ilia Alshanetsky
072be90d6f Added support for WBMP images. 2003-01-08 20:36:03 +00:00
Moriyoshi Koizumi
b064810550 Instances should not be freed in dtor()... 2003-01-07 22:53:42 +00:00
Moriyoshi Koizumi
b86a4edeed Made error msg format more consistent 2003-01-07 22:52:24 +00:00
Sara Golemon
f4f313ff40 Backout changes between 1.6 and 1.7 2003-01-07 16:43:26 +00:00
Zeev Suraski
651cea08f0 whitespace 2003-01-07 11:37:09 +00:00
Moriyoshi Koizumi
346fa499ca Fixed small leak 2003-01-07 08:57:27 +00:00
Moriyoshi Koizumi
eed5a6bed0 Implemented quoted-printable stream filter 2003-01-07 01:41:18 +00:00
Sara Golemon
35b1635c81 Add option to stream_get_filters() user-defined fiters vs. all filters, default to user only 2003-01-07 01:02:29 +00:00
Moriyoshi Koizumi
00a36a09e1 Implemented string.base64 stream filter
@- Implemented string.base64 stream filter. (Moriyoshi)
2003-01-07 00:03:25 +00:00
Ilia Alshanetsky
97dd1e8abf Fixed bug #21453 (improper handling of non-terminated <). 2003-01-06 22:13:03 +00:00
Ilia Alshanetsky
15f7c2c332 Fixed Bug #21443 and related bug #21468. 2003-01-06 21:43:28 +00:00
Moriyoshi Koizumi
4c2d6cfea8 Moved php_quot_print_decode() to quot_print.c so that it can be used
outside the iconv module
2003-01-06 15:47:25 +00:00
Wez Furlong
d23d4b366d Make it slightly more obvious that the return value is relative to the length
of the input data.
2003-01-06 14:04:23 +00:00
Anantha Kesari H Y
509b4d39b5 Added #ifdef HAVE_SYSLOG_H around syslog function in the whole file to avoid link failure. 2003-01-06 05:59:17 +00:00
Sara Golemon
999d989aa9 Added string.toupper and string.tolower filters and generalized non-op filter methods 2003-01-06 05:22:06 +00:00
Sara Golemon
42e912da79 Expose stream_filters_hash so that it can be searched by stream_get_filters() 2003-01-06 04:06:40 +00:00
Sara Golemon
7dae400063 Fixes to stream_get_wrappers() and stream_get_filters() handle hash table layouts better, plus some picune whitespace fixes 2003-01-05 22:24:49 +00:00
Ilia Alshanetsky
d5a8bb2d0b Fixed a memory leak in setlocale() & localeconv(). 2003-01-05 04:29:14 +00:00
Sara Golemon
43630e2ac0 Added stream_get_filters(); to list registered filters 2003-01-05 03:24:38 +00:00
Derick Rethans
b816089fbf - Fix some of the netware crap 2003-01-05 00:56:17 +00:00
Derick Rethans
e58c221204 - Change Warnings to Notices 2003-01-04 23:55:57 +00:00
Ilia Alshanetsky
f99fa7170e Fixed a bug that would cause flock() to never set the 3rd argument.
CS fixes & switched to new parameter parsing API.
2003-01-03 18:33:28 +00:00
Ilia Alshanetsky
71ab7dfccc Fixed a memory leak that occurs if the location specified by redirect header
cannot be opened.
2003-01-03 17:12:35 +00:00
Ilia Alshanetsky
c52cdad25a Further fixes related to bug #21267. 2003-01-03 17:05:16 +00:00
Anantha Kesari H Y
2e52c112df Modified for NetWare. 2003-01-03 16:06:02 +00:00
Anantha Kesari H Y
830298beb8 Modified for NetWare. 2003-01-03 14:37:42 +00:00
Derick Rethans
8f82834a79 - Update this one as well 2003-01-03 10:52:23 +00:00
Derick Rethans
32254e0938 - Remove double "Win32 COM" functions line 2003-01-03 10:48:38 +00:00
Sara Golemon
7b37272381 Added stream_get_wrappers() 2003-01-03 08:02:36 +00:00
Moriyoshi Koizumi
f962ba6abb Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
2003-01-03 05:05:12 +00:00
Ilia Alshanetsky
0ff59a1353 Fixed bug #21338 (crash inside html_entity_decode() when "" is passed).
Added test case for the bug.
2003-01-02 19:49:30 +00:00
Frank M. Kromann
4da2e804e0 Allow base64 functions to be called from an extension buils as .so/.dll (iconv) 2003-01-01 18:11:18 +00:00
Zeev Suraski
70446a6416 build fixes 2003-01-01 13:26:17 +00:00
Sebastian Bergmann
0ab3a13612 Fix warnings. 2003-01-01 12:36:06 +00:00
Wez Furlong
97a0102b81 Tidy up 2003-01-01 11:21:40 +00:00
Wez Furlong
f58628ca4d Move rot13 filter into a new filters.c source file.
Tidy up some other filter related code.

# win32 -> someone please add user_filters.c and filters.c to the .dsp
2003-01-01 11:04:44 +00:00
Wez Furlong
350b0bbeac Implement user-space filters.
See ext/standard/tests/file/userfilters.phpt for an example of their use.
2002-12-31 18:39:36 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Rasmus Lerdorf
f88e29bc0d Fix for bug #21311 2002-12-31 15:18:52 +00:00
Ilia Alshanetsky
bd19dabefe Fixed bug #21226 (parse_url handling of urls without a path). 2002-12-30 16:42:49 +00:00
Derick Rethans
d454becda8 - Whitespace 2002-12-30 15:03:50 +00:00
Marcus Boerger
426cf8eb57 fix state-machine in cases T_AAAA is not available 2002-12-30 11:59:22 +00:00
Ilia Alshanetsky
88d26985b8 Fixed bug #21267 (opening URLs that result in redirection to a relative
path was failing).
2002-12-29 20:01:33 +00:00
Derick Rethans
f3d3dd5bc8 - MFB 2002-12-26 23:45:05 +00:00
Wez Furlong
bb640840c3 Remove cruft that opened a stream that was never closed in get_meta_tags().
(probably my fault).
Noticed by Philip Olson
2002-12-26 22:35:00 +00:00
Sterling Hughes
457f22c198 if needle is empty free allocated memory 2002-12-26 20:52:42 +00:00
Sterling Hughes
ca67d27fb2 remove memleak 2002-12-26 19:56:44 +00:00
Derick Rethans
b996b32031 - Add test for bug #21182 2002-12-25 20:08:36 +00:00
Ilia Alshanetsky
fbcee73c8c Make range operate on the copies of the parameters rather then modify the
actual parameters.
2002-12-25 20:02:03 +00:00
Melvyn Sopacua
0764c3101b Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't
supported and there are no matches.

# BSDi/Mac OSX are affected.
2002-12-23 18:33:46 +00:00
Wez Furlong
c5091eedf1 Forgot to include this in my previous commit for #21131 fix. 2002-12-22 18:06:27 +00:00
Wez Furlong
efea12fec5 Fix for Bug #21131: fopen($file, 'a+') would incorrectly assume that
the stream position was at offset 0.
This corrects that assumption by querying the stream for it's position
when it detects the 'a' "flag" in the mode parameter to fopen.
Also added a test for plain files and amended the userstreams test to
take this into account.
2002-12-22 18:05:36 +00:00
Sara Golemon
13308b5a94 Minor clarification in meaning of bitmask constants
/* PHP_DNS_xx = 1<<(T_xx-1) */
T_CNAME = 5 ergo PHP_DNS_CNAME should be 0x00000010.
T_SOA = 6 ergo PHP_DNS_CNAME should be 0x00000020.
2002-12-20 18:34:56 +00:00
Ilia Alshanetsky
3a4bf3f904 When low & high are the same return an array containing the low value.
Added support for float values and handling of numeric values being passed
as strings.
Added a test case for range().
2002-12-20 17:16:31 +00:00
Marcus Boerger
d795243db3 @Make uniqid() parameters optional and allow any prefix length. (Marcus) 2002-12-20 17:06:25 +00:00
Marcus Boerger
8652e8ac27 MFB 2002-12-20 17:04:33 +00:00
Marcus Boerger
26038795f8 -disable uniqid() when required lib functions not available
-emit an error when uniqid() will fail
-make more_entropy parameter default to true for CYGWIN
2002-12-20 16:34:42 +00:00
Wez Furlong
602734c7d9 Correct mistake introduced by my last commit on these files;
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.
2002-12-19 20:23:50 +00:00
Ilia Alshanetsky
594c3808d4 Fixed bug #21098. 2002-12-19 17:06:36 +00:00
Moriyoshi Koizumi
d2fa4670dc Prevented test failure caused by LF code variety 2002-12-18 23:06:27 +00:00
Moriyoshi Koizumi
92d5faca60 MFB 2002-12-12 21:44:53 +00:00
Moriyoshi Koizumi
d679e5d2aa Added a test case for bug #20934 2002-12-12 21:42:17 +00:00
Melvyn Sopacua
44b7c16b03 Fix for BSD's (possibly others):
Accept system default, for the index. Don't initialize it.
2002-12-12 18:50:26 +00:00
Wez Furlong
c5d4e4b321 MFB: popen/pclose and proc_open/proc_close fixes. 2002-12-12 17:51:25 +00:00
Ilia Alshanetsky
53b333d153 Fixed misspelling of the Greek letter lambda,
noticed by jmartin-php@notamusica.com.
2002-12-12 14:50:58 +00:00
Ilia Alshanetsky
75c180f242 Fixed bug #20927 and updated the test case for the bug. 2002-12-12 13:38:19 +00:00
Moriyoshi Koizumi
3bbcb0d0dd Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) 2002-12-12 13:25:51 +00:00
Melvyn Sopacua
4b3b409b48 Add testcase for reported wordwrap bug 2002-12-11 20:22:42 +00:00
Ilia Alshanetsky
c194d9333d Added getopt() test. 2002-12-11 17:38:28 +00:00
Moriyoshi Koizumi
4974f268a6 @- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) 2002-12-09 15:54:38 +00:00
foobar
085f362ae3 T_AAAA is not always available. 2002-12-09 11:50:15 +00:00
Moriyoshi Koizumi
8d1b2bf8a5 Prevented return_value from being freed() twice 2002-12-08 09:54:30 +00:00
Sara Golemon
a4d6863ee5 Bug #17174 Added IPv6 (AAAA record) support to dns_check_record() also added support to dns_get_record 2002-12-08 08:14:43 +00:00
Ilia Alshanetsky
3bc8512cf0 Added test case for bug #20865. 2002-12-06 17:46:26 +00:00
Ilia Alshanetsky
ed7c3bfe0e Fixed bug #20865, array_key_exists() could not locate NULL keys. 2002-12-06 17:35:52 +00:00
Ilia Alshanetsky
c668055159 Remove pointless checks for array_init() return values. 2002-12-05 22:28:02 +00:00
Sara Golemon
ad65d01cbe Bug #20746. Renamed aggregation_info() to aggregate_info() per naming conventions and created alias for BC. 2002-12-05 21:20:47 +00:00
Marcus Boerger
49a99a98f4 -php_error -> php_error_docref
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Ilia Alshanetsky
7364e3b771 Fixed bug #12556, updated the test for this bug. 2002-12-05 20:01:19 +00:00
Melvyn Sopacua
bd06d48e56 Test data 2002-12-05 19:30:28 +00:00
Melvyn Sopacua
76436b8820 Add a testcase for this bug 2002-12-05 19:29:45 +00:00
Marcus Boerger
19d5e535c0 Remove unnecessary code here 2002-12-05 15:52:20 +00:00
Marcus Boerger
373361d9c4 Return FALSE on error as mentioned by John Coggeshall.
See Bug #20822
2002-12-05 12:39:00 +00:00
Moriyoshi Koizumi
cf0a0f0967 Added a test for bug #12776 2002-12-04 17:01:07 +00:00
Moriyoshi Koizumi
7bf4090efb Fixed segfaults of array_walk() when keys are passed to cb by reference.
Fixed bug #12776.
2002-12-04 16:41:28 +00:00
Moriyoshi Koizumi
242ddba326 Fixed leaks in array_walk() 2002-12-03 15:02:06 +00:00
Ilia Alshanetsky
057e87e6e5 Repositioned CoInitialize and CoUninitialize that apparetly makes it more
correct according to MS docs. Patch (+5) by Michael Sisolak
<msisolak@yahoo.com>.
2002-12-02 06:43:54 +00:00
Moriyoshi Koizumi
aeb6a6c458 Fixed possible buffer overflow in php_base64_decode();
# This bug doesn't appear to be harmful for now,
# so I won't merge it into branches...
2002-12-01 02:44:50 +00:00
Ilia Alshanetsky
cc13af6a07 Fixed bug #20716. 2002-11-30 19:12:48 +00:00
Marcus Boerger
0d7957bc15 Bug #20433 2002-11-30 18:36:17 +00:00
Martin Kraemer
c5a7a522a1 Portability: Use 0 if the platform does not define EX_OK 2002-11-28 08:23:36 +00:00
Sterling Hughes
52a451ccd2 no more need for this either 2002-11-27 20:06:01 +00:00
Sterling Hughes
5c96f91123 don't use stupid constants, be smart, just read the line 2002-11-27 20:05:20 +00:00
Ilia Alshanetsky
e195b10ede Fixed bug #20664. 2002-11-27 06:20:19 +00:00
Moriyoshi Koizumi
98dace883e Improved the error reporting portion of array_walk() as suggested by Markus 2002-11-26 22:12:40 +00:00
Moriyoshi Koizumi
3fd513f32a Prevent too many error reports from being displayed 2002-11-26 21:51:37 +00:00
Moriyoshi Koizumi
61b3d5ccb5 Fixed incorrect error messages of array_walk() in case the callback is
specified in an array form
2002-11-26 21:21:32 +00:00
Stefan Esser
ababfedb66 tmp_line was possible uninitialised, resulting in crap error messages. 2002-11-25 22:53:57 +00:00
Ilia Alshanetsky
693fd4a36b Added a check to determine if the file can be retrieved or sent.
This check also prevents incorrect error reporting in the event the retrieval
or the sending of the file cannot be accomplished.
2002-11-25 22:00:52 +00:00
Hartmut Holzgraefe
8bd550825f email address change 2002-11-25 12:30:28 +00:00
Derick Rethans
36e82c84ae - Make it compile on IRIX again
#- Tested with Linux/FreeBSD and IRIX
2002-11-23 19:03:21 +00:00
Moriyoshi Koizumi
44c98c7e3f Fixed some odd behaviours of range() 2002-11-23 11:27:56 +00:00
Sara Golemon
e9047df607 New function dns_get_record(): close resolver socket after use.
fix to internal func php_parserr(): correct bug in return state.
2002-11-23 01:09:07 +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
Sander Roobol
e532b24d82 One Apache 1.3 line is enough 2002-11-20 12:53:40 +00:00
Stefan Esser
63a50e500d Adding SHA1 tests. 2002-11-19 23:25:57 +00:00
Ilia Alshanetsky
7751c4f549 Do not register IMAGETYPE_SWC if zlib, which is needed for parsing of swc
files is not available.
2002-11-19 21:24:47 +00:00
Edin Kadribasic
543c383302 Update Credits 2002-11-19 15:11:27 +00:00
Marcus Boerger
3ca6344e57 -rename checkdnsrr to dns_check_record, keep old name as alias
-rename getmxrr to dns_get_mx, keep old name as alias
-added dns_get_record
@Added dns_get_record() which allows to retrieve DNS information about
@a host. (Marcus, Pollita)
2002-11-19 02:34:13 +00:00
Marcus Boerger
301330ff88 -Added colordepth for png
-Added tests for width/heidth for unsigned/signed problems
2002-11-18 16:51:02 +00:00
Marcus Boerger
a3d821c695 Added colordepth for png 2002-11-18 16:50:10 +00:00
Marcus Boerger
25456939b3 Fixing unsigned/signed problems (and i thought about it before...) 2002-11-18 15:49:06 +00:00
Derick Rethans
e93f1c00c6 - Remove outdated GPL clause; the file was totally rewritten 2002-11-18 15:45:27 +00:00
foobar
43584058e9 Added error message if browscap location is not set in php.ini 2002-11-18 03:23:51 +00:00
Ilia Alshanetsky
c7fa1fa99f Fixed bug #20462. 2002-11-18 03:16:13 +00:00
Marcus Boerger
24726b0c64 Conversion fix by Michael Mauch 2002-11-17 09:27:48 +00:00
Marcus Boerger
2442adabe5 Force float for the float test 2002-11-16 23:45:58 +00:00
Marcus Boerger
015c117e37 -Do not rely on a side effect of 32bit platforms (patch by Michael Mauch)
-remove unused sections
2002-11-16 17:28:04 +00:00
Marcus Boerger
31e1cd13e2 removed unused sections 2002-11-16 17:26:52 +00:00
Ilia Alshanetsky
47596de32f Fixed the test so it works properly on both 32 and 64 bit platforms. 2002-11-16 17:26:26 +00:00
Marcus Boerger
a3157908a8 Make getimagesize more robust against corrupt files 2002-11-16 17:02:07 +00:00
Sebastian Bergmann
47388f2121 Fix Win32 build. 2002-11-16 08:30:31 +00:00
Ilia Alshanetsky
8193641d2d With ZTS on, we need to resolve the full paths before making symlinks.
If a chdir() call occurs before the symlink operation, the symlink is
created in the current directory rather then directory we've chdired to
because in ZTS we don't actually chdir but store the new path internally.

For an example of this problem consider the ext/standard/tests/file/001.phpt
test under ZTS.
2002-11-15 16:34:16 +00:00
Moriyoshi Koizumi
7222abda70 Include php_config.h for HAVE_MBSTRING 2002-11-15 16:13:36 +00:00
Marcus Boerger
8c598f8bff Only show the first results 2002-11-15 14:46:52 +00:00
foobar
dadfd6e94a ws fix 2002-11-15 07:21:33 +00:00
Moriyoshi Koizumi
fb20eae7fc Fixed bug #20381 2002-11-15 02:16:41 +00:00
Moriyoshi Koizumi
ac209557dd Added a test case for bug #20381 2002-11-15 02:11:23 +00:00
Stig Bakken
bdeb45b335 Added PATH_SEPARATOR constant 2002-11-14 22:50:01 +00:00
Andrei Zmievski
26bd73fec6 Sort the modules for info output as well. 2002-11-14 21:15:42 +00:00
Moriyoshi Koizumi
db6efcf7e5 Prevent warnings under safe mode 2002-11-14 18:38:38 +00:00
Ilia Alshanetsky
5f7de8bf5b Fixed bug #20423. 2002-11-14 16:20:23 +00:00
Wez Furlong
f921ea9f7d Add a test case for this "bug" # 20134.
I'm not sure that this test is actually useful, so I'm not adding
it to the branch.
2002-11-14 14:56:35 +00:00
Wez Furlong
4e85935386 MFB 2002-11-14 14:26:15 +00:00
Ilia Alshanetsky
6b7d77a7a0 Fixed bug #20420 and added partial urls to the test of the function. 2002-11-14 13:40:14 +00:00
Wez Furlong
b01add793c Add this test to make sure that fopencookie is detected and working
correctly (or that the less efficient tmpfile casting is working).
More details in the test itself.
2002-11-14 12:20:36 +00:00
Derick Rethans
bab4957d1c - MFB: Fixed bug #20484 (stream_get_meta_data crashes on a normal file
stream). (Derick, Wez)
2002-11-14 10:56:35 +00:00
Jon Parise
92df58dab6 @- Added an optional "step" parameter to range(). (Jon) 2002-11-14 05:46:10 +00:00
James Cox
ad9788d853 changing..
#also, i think the qa and web team needs updating -- i'd like to see web change to a more general infrastructure category... anyone care to volunteer? :)
2002-11-14 02:05:53 +00:00
John Coggeshall
253cecd43a Added GLOB_ONLYDIR and GLOB_BRACE for compatiable systems for the glob()
function.

Modified the layout and some minor logic in the experimental webHarness()
test class

Added Whitespace accidently to array.c :)
2002-11-13 13:31:33 +00:00
Moriyoshi Koizumi
c65cbd2409 Fixed the tests so that they won't be affected by the ini setting of
default_charset
2002-11-12 21:37:54 +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
Ilia Alshanetsky
ef7bd02688 Added test for swc files (compressed swf files), this must be done in a
separate test, since this test has a dependency on the zlib extension.
2002-11-12 17:47:20 +00:00