Sebastian Bergmann
85a13e3e9a
Fix warnings.
2003-05-17 06:21:34 +00:00
Sara Golemon
8924395720
MFB(r-1.333.2.27) Bugfix 23654. If subject is an array and it contains other arrays, we want to pass those subarrays through unchanged rather than attempt to convert them to string.
2003-05-16 23:30:08 +00:00
Ilia Alshanetsky
7e2a99d091
Fixed bug #23657 (Missing initialization in browscap module init)
2003-05-16 15:13:47 +00:00
Moriyoshi Koizumi
27b8c453b9
copy'n'paste failure
2003-05-16 06:24:57 +00:00
Moriyoshi Koizumi
3d2b9af9eb
Added test case for bug #23650
2003-05-16 06:20:23 +00:00
Moriyoshi Koizumi
8cbb6b6341
Fixed bug #23650 (strip_tags() removes hyphens)
2003-05-16 06:19:51 +00:00
Ilia Alshanetsky
e2444c223b
MFB
2003-05-16 01:09:58 +00:00
Moriyoshi Koizumi
f78ec11339
Fixed test so it won't fail in case the output handler is enabled
2003-05-15 19:20:31 +00:00
Sara Golemon
022a1625a3
Implement unlink() method in ftp wrapper ops and do some general cleanup of other code
2003-05-14 18:02:10 +00:00
Sara Golemon
65d359d71a
Fold 'options' parameter into wops->unlink method
2003-05-14 15:12:07 +00:00
Sascha Schumann
31dc62a905
MFB segfault fix
2003-05-14 08:27:48 +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
4e9e9c6e21
Fixed bug #22463 and bug #23581
2003-05-11 06:36:37 +00:00
Moriyoshi Koizumi
065a192411
Added a test case for bug #23581
2003-05-11 06:33:35 +00:00
Moriyoshi Koizumi
b666d8c679
Added test case for bug #22463
2003-05-11 02:37:17 +00:00
Moriyoshi Koizumi
598dba147d
Fixed test case so it reflects the recent change on var_dump()
2003-05-08 23:23:02 +00:00
Moriyoshi Koizumi
ea39409c60
Added missing break
2003-05-08 16:45:59 +00:00
Moriyoshi Koizumi
e911b39158
Added "€" support for htmlentities() and html_entity_decode()
2003-05-08 15:43:34 +00:00
Moriyoshi Koizumi
ee86979e21
I should have tested more carefully..
2003-05-08 15:39:24 +00:00
Moriyoshi Koizumi
6ed4fd1666
Improved html_entity_decode() so it can handle multibyte charsets and
...
numeric entities.
2003-05-08 10:42:20 +00:00
Ilia Alshanetsky
b20df54af7
Make serialize precision a configurable option.
2003-05-08 01:23:21 +00:00
Sara Golemon
13191aa841
Revert, this caused more trouble than it fixed.
2003-05-07 20:33:53 +00:00
Moriyoshi Koizumi
29f346d7d7
Removed redundant TSRMLS_FETCH's
2003-05-07 17:40:46 +00:00
Sara Golemon
451cd602f6
HINFO RDATA is <label><label> not <nshort><nshort>
2003-05-06 19:51:46 +00:00
Ilia Alshanetsky
7f404846ad
s/g/G/
2003-05-05 22:21:29 +00:00
Ilia Alshanetsky
a7591863fd
Fixed tests to reflect full float values.
2003-05-05 19:57:32 +00:00
Moriyoshi Koizumi
b874a54846
Added links to HTML entity resources
2003-05-05 19:50:15 +00:00
Hartmut Holzgraefe
e6490c4a41
basename() now binary safe, testcases added
2003-05-05 13:46:14 +00:00
Hartmut Holzgraefe
e364d1f589
proto fix
2003-05-05 12:36:35 +00:00
Thies C. Arntzen
747822c616
fixed FMR
2003-05-05 12:17:02 +00:00
Ilia Alshanetsky
88bafcb7a5
Safer implementation.
...
Thanks Marcus.
2003-05-04 19:09:54 +00:00
Ilia Alshanetsky
75c01dd66b
Fixed bug #23298 (serialize cuts off floats & doubles)
2003-05-04 18:41:02 +00:00
Moriyoshi Koizumi
b44ae54bc6
Real fix and a test case for bug #22008
2003-05-04 12:44:36 +00:00
Moriyoshi Koizumi
e9c903ad3f
A quick fix for bug #22008
...
# BTW I'm working on an enhanced strip_tags implementation with re2c, which
# will feature more CSS awareness and more stateful scanning.
2003-05-04 11:45:58 +00:00
Moriyoshi Koizumi
1dfc59f6d8
Added missing sanity check
...
# likely a fix for bug #23457
2003-05-04 11:19:57 +00:00
Moriyoshi Koizumi
7638a25fef
Fixed bug #23449
2003-05-02 11:00:42 +00:00
Andrey Hristov
a894bf5c87
Extending substr_replace().
...
Every parameter can be mixed (string/array) also the return type.
#see the test file if you need more info.
2003-05-02 10:02:40 +00:00
Sara Golemon
07c679064a
Bug Fix (22433). When the bottom of a range() is chr(0) or the top is chr(255), the for loop carries over and never exits.
2003-05-02 00:58:02 +00:00
Moriyoshi Koizumi
193fe6863a
Really fix the test.
...
# sorry for the mess..
2003-04-30 16:30:44 +00:00
Sara Golemon
5d3a8e4ce7
Add support for SRV and NAPTR records to dns_get_record() and dns_check_record()
...
Feature Request #23407
2003-04-29 22:02:01 +00:00
Wez Furlong
89503b163e
Fix dirname() under win32.
...
The calculated length would be off-by-two under windows, which resulted in bogus dirnames.
2003-04-29 13:35:48 +00:00
Moriyoshi Koizumi
180806f9e6
Fixed typo
2003-04-29 13:05:58 +00:00
Moriyoshi Koizumi
cc9b7895a0
Fixed bogus skip condition
2003-04-29 13:04:19 +00:00
Jay Smith
ab1124b014
A few fixes Uwe suggested, plus plugged a memleak and a possible
...
overrun.
2003-04-28 21:49:47 +00:00
Derick Rethans
9ab3ad2963
- Commit the .c file too...
2003-04-28 18:52:59 +00:00
Derick Rethans
cd13464709
- Make them available on Windows too from other files.
2003-04-28 18:41:32 +00:00
Sascha Schumann
e422f56dff
improve php_url_encode
2003-04-28 16:24:14 +00:00
Moriyoshi Koizumi
f4c9feb774
Added missing sanity check in fgetcsv()
2003-04-28 15:04:56 +00:00
Wez Furlong
169b3f72ed
Fix for #23340 ; fopen on multiple urls from the same server crashes.
2003-04-28 14:41:36 +00:00
Sara Golemon
bb48c7d861
Take STREAMS_CC/STREAMS_DC declarations out of do_connect/do_pasv where they don't need to be. Add minimalist url_stat method to ftp:// wrapper which can at least determine filesize. Other properties set to 0 since the FTP protocol simply doesn't support exploring them. url_stat won't actually work however until ext/standard/filestat.c is patched to allow stat wrappers.
2003-04-26 01:55:31 +00:00
Sara Golemon
2d558127af
No idea how that character dissapeared.
2003-04-24 22:25:33 +00:00
Sara Golemon
2fc1d2c330
Fix error handling bug I just introduced (php_ftp_fopen_connect == NULL) and add append support to wrapper
2003-04-24 21:21:41 +00:00
Sara Golemon
228f65f889
Abtract some ftp connection/negotiation steps out and add support for stream_opendir. This allows things like opendir('ftp://ftp.foo.com/path')
2003-04-24 20:32:14 +00:00
David Hill
cec89b2446
Fix compiler error on null statement in switch
2003-04-24 18:01:26 +00:00
Rasmus Lerdorf
0d248d81a6
MFB: &039; which is a single-quote may also come in as &39;
...
I see no reason not to support both in html_entity_decode()
2003-04-22 20:47:09 +00:00
Sara Golemon
cb89565ba4
Feature Request #7121 .
...
Allow overwritting of files via ftp:// wrapper.
Requires context option: $context['ftp']['overwrite'] != 0
2003-04-22 04:13:09 +00:00
Sascha Schumann
c523fc4766
Add vr class
...
Noticed by: Jon Parise
2003-04-22 03:21:29 +00:00
Moriyoshi Koizumi
c591d4decd
Reduced leaks in userland filters
2003-04-21 18:43:36 +00:00
Moriyoshi Koizumi
cf620ddfdb
Unified all those redundant printf's
2003-04-21 18:00:41 +00:00
Stanislav Malyshev
5a904d6ea8
Update to latest inteface change for get_class_name
2003-04-21 17:03:29 +00:00
Sara Golemon
7c8c09b3cf
Revert change to stream_copy_to_stream()
2003-04-20 01:18:58 +00:00
Marcus Boerger
9e19524c5e
Access the struct directly here
2003-04-19 19:06:52 +00:00
Ilia Alshanetsky
6bc4ce43d0
Do not hardcode php path.
2003-04-19 18:10:54 +00:00
Ilia Alshanetsky
e4c38aec5a
Do not make the test rely on the availability of the cat command.
2003-04-19 17:45:46 +00:00
Sascha Schumann
e4183ae980
Extend print_table_row so that one can specify the CSS class
...
directly. Add "vr" class which aligns the content to the right border.
2003-04-19 17:40:19 +00:00
Marcus Boerger
b99a491e33
Update to new macros
2003-04-19 15:01:22 +00:00
Sara Golemon
6dde464ce7
Let stream_copy_to_stream() accept either stream resource or filename/url string. If filename, open the file, do the copy, then close it.
2003-04-19 02:47:16 +00:00
Sara Golemon
19ef914bb4
Catch up to Moriyoshi's streams megapatch
2003-04-17 23:59:28 +00:00
foobar
2cd55ce73b
touch
2003-04-17 02:54:23 +00:00
foobar
b319982868
add missing header
2003-04-17 02:53:32 +00:00
foobar
85874549d6
touch
2003-04-17 02:45:10 +00:00
Moriyoshi Koizumi
0c5548e636
Fixed implicit cast issue with is*() and to*() functions
2003-04-16 21:40:48 +00:00
Moriyoshi Koizumi
0ad2fc2007
Fixed bug #19795
...
# to*() and is*() expect for their arguments an integer in range of 0 - 255
2003-04-16 21:10:29 +00:00
Moriyoshi Koizumi
2a31fa0569
Fixed memleak
2003-04-16 15:10:01 +00:00
Moriyoshi Koizumi
6dd17c380d
Added missing sanity check
2003-04-16 14:55:25 +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
Sascha Schumann
0bda867fe7
Simplify use of this header in external apps
2003-04-16 09:14:32 +00:00
Ilia Alshanetsky
7f8bd25fcc
Fixed bug #23225 (money_format() didn't handle erroneous return of strfmon)
...
# Initial patch proposed by marcot@tabini.ca
2003-04-16 01:07:03 +00:00
Ilia Alshanetsky
3d6fccc08c
Fixed bug #23152 ($http_response_header empty on invalid URLs)
2003-04-14 13:55:34 +00:00
Sara Golemon
9103aac254
Modify str_replace/str_ireplace to report how many needles were matched. (FR #8218 )
2003-04-13 22:59:19 +00:00
Moriyoshi Koizumi
560efa10c0
Forgot about this one :)
2003-04-12 21:56:08 +00:00
Moriyoshi Koizumi
fa0ac8a273
Made dirname() binary-safe.
2003-04-12 21:53:46 +00:00
Sara Golemon
76965beb04
Add tests for strrpos/stripos, and minor fix to maintain BC for condition with empty needles/haystacks
2003-04-12 20:04:06 +00:00
Sara Golemon
0b5c1112c5
Rewrite strrpos and strripos to be binary safe and behave the way their prototype suggests (also like their counterparts strpos and stripos) i.e.: Allow string needles rather than just characters
2003-04-12 07:36:22 +00:00
Sara Golemon
8da5e8e48e
Export constants to userland
2003-04-11 02:55:00 +00:00
Rasmus Lerdorf
861679d6c3
MFB: Forgotten _FORM -> _REQUEST change
2003-04-09 17:46:42 +00:00
Derick Rethans
429ae4e821
- Fixed printing the version string if it includes zend extensions in
...
text-mode
2003-04-09 15:19:07 +00:00
Sara Golemon
87c5019dd2
Switch file_put_contents 'bool use_include_path' to 'int flags' to allow other options such as appending
2003-04-08 23:24:53 +00:00
Sara Golemon
41d4fcd0da
Add context support to file_put_contents() and readfile(), convert readfile() to zend_parse_parameters usage, fix proto for file_put_contents()
2003-04-08 22:10:15 +00:00
Sara Golemon
1e853b74a3
Added context support to file()
2003-04-08 21:00:07 +00:00
Andrei Zmievski
b18542ba68
Remove php_memnstr (it's in ZE now).
2003-04-08 17:15:43 +00:00
foobar
a45b4258f0
file_set_contents -> file_put_contents
2003-04-08 14:12:52 +00:00
Sara Golemon
8001f2922c
Add context support to file_get_contents
2003-04-08 00:02:47 +00:00
Sara Golemon
70155b6dcf
Introduce support for context options 'method', 'header', 'content'
2003-04-07 21:02:04 +00:00
foobar
c3e90bd6ed
Fixed bug #23071 (when DST in effect, date("T") crashed PHP)
2003-04-06 22:37:45 +00:00
Wez Furlong
c64256e671
Warning fix
2003-04-04 21:09:25 +00:00
Sara Golemon
a65564f0fa
User shouldn't have to initialize this pass-by-ref parameter
2003-04-04 20:43:36 +00:00
Wez Furlong
0148c0cb02
Simplify and enhance readability.
2003-04-04 08:57:40 +00:00
Sara Golemon
b2d4514580
Added stream_get_transports()
2003-04-04 05:21:03 +00:00
Sara Golemon
465bb61357
Kludgy fix for floating point drift causing problems like range(1.0,1.5,0.1) == array(1.0,1.1,1.2,1.3,1.4);
2003-04-03 18:33:05 +00:00
Sascha Schumann
7e7bbb751e
Prevent entering of anything but arrays/strings in register_shutdown_func
...
Noticed by: Jan Schneider
2003-04-03 18:09:41 +00:00
Derick Rethans
6412e65bf9
- CS
2003-04-03 06:21:59 +00:00
foobar
16da825c7c
CS fix
2003-04-03 01:12:47 +00:00
Rasmus Lerdorf
066a68d7fa
MFB: Fix unregister_tick_function crash
2003-04-02 23:11:31 +00:00
Rasmus Lerdorf
1612ffad05
MFB: Fix the setlocale() segfault
2003-04-02 21:33:02 +00:00
Colin Viebrock
4888473efa
fixes for logo guid functions
2003-04-02 16:51:40 +00:00
Sara Golemon
c249c67178
New test for userfilters rewrite
2003-04-02 00:41:09 +00:00
Ilia Alshanetsky
aab9718253
Fixed possible integer overflow in str_repeat().
2003-04-02 00:25:45 +00:00
Rasmus Lerdorf
4b343a0562
MFB
2003-04-01 21:47:21 +00:00
Moriyoshi Koizumi
6301bd9b95
Fixed bogus test
2003-04-01 19:47:33 +00:00
Moriyoshi Koizumi
b302824171
Added a test case for bug #22538
2003-04-01 19:10:04 +00:00
Moshe Doron
3c982dea22
oops
2003-04-01 12:54:35 +00:00
Moshe Doron
d8b5687925
revert due the last string.c revert
2003-04-01 12:53:44 +00:00
Moshe Doron
31bd24860c
revert last commit for now
2003-04-01 12:46:01 +00:00
Thies C. Arntzen
60214a0338
*** empty log message ***
2003-04-01 11:04:38 +00:00
Sascha Schumann
cc39646730
Fix segfault in register_shutdown_function
2003-04-01 10:02:29 +00:00
Sara Golemon
48c947389e
Bug #22962
2003-04-01 06:21:54 +00:00
Sebastian Bergmann
b8e3e0bfe3
Sorry Sterling, but this broke the ZTS build and I'd rather not 'ZTS fix' an April's Fool joke.
2003-04-01 05:30:32 +00:00
Sterling Hughes
53d90d8b9b
Add the landonize() and landonize_url() functions which provide a secure
...
alternative to the sha1() and sha1_file() functions.
2003-04-01 05:01:50 +00:00
Moriyoshi Koizumi
93386a8b09
oops
2003-03-31 23:49:53 +00:00
Moriyoshi Koizumi
e8f13586a7
Fixed test; in ZE2, all the properties used in any methods are populated
...
at compile time.
2003-03-31 22:54:18 +00:00
Moshe Doron
64bd1cdbd6
# make derik happy
2003-03-31 19:01:43 +00:00
Moshe Doron
dc8daad70d
fix for 22904
...
@ now addslashes() do it also on cybase magic mode(moshe).
2003-03-31 18:56:41 +00:00
Moshe Doron
5c3a073c07
# unnecessary condition here.
2003-03-31 12:08:31 +00:00
Sascha Schumann
0481896ff7
TS issue, noticed by Sebastian Bergmann
2003-03-31 05:39:25 +00:00
Sascha Schumann
cb3c506639
Ensure that the seed function has been called, even if we are used by
...
another module's request init function.
Noticed by: marcus.boerger@t-online.de
2003-03-31 03:24:18 +00:00
Moriyoshi Koizumi
47e40e1b98
Improved var_dump() and debug_zval_dump() so they also show the
...
namespace of the given object.
2003-03-29 21:29:22 +00:00
Ilia Alshanetsky
0e73275429
CS
2003-03-28 14:31:31 +00:00
David Hill
60a7aef6e9
Changing parsedate to be reentrant using pure_parser (Dave)
2003-03-28 13:10:52 +00:00
Ilia Alshanetsky
3db5278dcc
CS
2003-03-27 18:57:53 +00:00
David Hill
86569cb154
Backing out part of TZ change
2003-03-27 14:23:48 +00:00
David Hill
1fa7504fae
Changing TZ to match Unix98 standard to make Tru64 happy
2003-03-26 16:42:03 +00:00
Sebastian Bergmann
5ca078779a
Eliminate some TSRMLS_FETCH() calls. Tested with Win32 build of SAPI/CGI and SAPI/CLI on Win32.
2003-03-25 08:07:13 +00:00
Moriyoshi Koizumi
570e929d49
Fixed bug #22834 (compile failure due to ugly implicit casts)
2003-03-24 21:22:23 +00:00
Moriyoshi Koizumi
03a5129429
oops...
2003-03-24 19:24:35 +00:00
Moriyoshi Koizumi
68b03bde3a
Added test cases for new functionality
2003-03-24 19:21:20 +00:00
Moriyoshi Koizumi
93b250f923
Added koi8-r, cp866, and cp1251 support for htmlentities
2003-03-24 19:13:02 +00:00
Alex Waugh
d403ed4bc3
Fix linkage of symbols.
2003-03-23 21:58:03 +00:00
Shane Caraveo
456b6cbeab
The environment should *never* be magic quoted.
2003-03-23 19:30:31 +00:00
Sterling Hughes
0a4282eabf
fix segfault in file_set_contents() when the file could not successfully
...
be opened.
2003-03-21 22:22:15 +00:00
Wez Furlong
0fd995f9fc
Add the mode string that was used to open the stream to the meta data,
...
as requested by Philip Olson.
2003-03-18 23:45:27 +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
Jay Smith
c0d1508ec8
get_browser() needs to use zend_is_auto_global() on _SERVER.
2003-03-18 21:49:01 +00:00
Marcus Boerger
3e621fac94
make phpinfo() depend on executed sapi
2003-03-18 20:52:52 +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
Wez Furlong
862586e376
CS fixes
2003-03-18 14:35:15 +00:00
Stig Bakken
0e6fca4f22
* email address change
2003-03-18 12:06:09 +00:00
Hartmut Holzgraefe
dbe4f2238c
proto fixes
2003-03-17 13:11:19 +00:00
Sascha Schumann
d0debaf45c
Merge macro changes
2003-03-16 23:02:19 +00:00
Jay Smith
830b14297f
@- Fixed bug #22386 (Using browscap causes segfault). This fix
...
@ also adds an optional bool argument to get_browser() that
@ makes the return value an array instead of an object. (jay)
2003-03-14 17:54:38 +00:00
Jay Smith
39ec83bb5f
Solaris knows nothing of "Europe/Amsterdam". Use "US/Eastern" instead.
2003-03-13 18:51:39 +00:00
Sterling Hughes
39b8f06f9b
@ Add the file_set_contents() function, as a complement to the file_get_contents()
...
@ function. (Sterling)
2003-03-12 06:47:34 +00:00
Sascha Schumann
65b9a40640
fix sizeof(size_t) > sizeof(uint) issue
2003-03-11 02:28:46 +00:00
Sascha Schumann
dfb0d70b5b
reverting jani's non-sense commits
2003-03-11 01:47:06 +00:00
foobar
febb535db0
touch
2003-03-10 22:59:46 +00:00
foobar
7a1ecedf85
64bit issue fixed
2003-03-10 22:59:34 +00:00
Moriyoshi Koizumi
a41e0c1382
Modified the test to reflect the recent change on var_dump()
2003-03-10 20:46:39 +00:00
David Hill
a7b84ac7cb
Correcting int/long mismatched - 64bit issues.
2003-03-10 20:30:33 +00:00
Andrei Zmievski
b1546a1775
Print the object handle (it's useful).
2003-03-10 15:13:32 +00:00
Sara Golemon
c4a491e12c
Adjustment to user filters reimplementation. Make a bucket an object containing a resource(the real bucket) and a data element for direct operations. Simplifies
...
user interface and reduces number of function calls/reallocs needed.
2003-03-09 23:12:31 +00:00
Derick Rethans
0d603b2d9a
- Fix proto
2003-03-09 00:05:48 +00:00
Stefan Esser
1f54605723
wrong place.
2003-03-08 14:51:16 +00:00
Stefan Esser
76c427fd05
fixing memory leak
2003-03-08 14:37:01 +00:00
foobar
3c9155e0cb
Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
...
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
David Hill
5c90216d2c
64-bit correction to variables passed to zend_parse_parameters
...
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Stefan Esser
af4aa97d1e
Fixing functionicalls with variable number of parameters...
2003-03-06 20:31:20 +00:00
Moriyoshi Koizumi
9bdc86973b
Fixed a small leak in the convert filter code
2003-03-05 17:51:33 +00:00
Ilia Alshanetsky
53530765ff
Added support for http redirects to ftp.
...
Fixed bug #22508 (Added protection against circular HTML redirects).
2003-03-04 16:04:05 +00:00
Ilia Alshanetsky
b162e18a29
Skip test if running under safe-mode.
2003-03-04 14:37:38 +00:00
Edin Kadribasic
d1feae01d9
Credits update.
2003-03-04 00:10:11 +00:00
Zeev Suraski
622da33231
- Optimize $_REQUEST
...
- Fix phpinfo()
2003-03-02 13:35:01 +00:00
Moriyoshi Koizumi
da0d5a11ed
Fixed my silly mistake in the filter code
2003-03-02 08:39:01 +00:00
Wez Furlong
558db0d87a
Expose php_stream_copy_to_stream as stream_copy_to_stream(); a high
...
performance alternative to looping reads and writes.
2003-03-01 01:27:50 +00:00
Wez Furlong
349ce76f96
Tidy up stupid signed/unsigned issues with win32 by introducing a php_socket_t typedef.
2003-02-28 21:03:36 +00:00
Wez Furlong
68c1294462
Add this file...
2003-02-28 20:06:05 +00:00
Wez Furlong
1b53a2d12e
New user-space functions:
...
. stream_socket_client() - similar to fsockopen(), but more powerful.
. stream_socket_server() - Creates a server socket.
. stream_socket_accept() - Accept a client connection.
. stream_socket_get_name() - Get local or remote name of socket.
Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
Ilia Alshanetsky
14bf872003
Fixed compiler warnings.
2003-02-28 17:26:28 +00:00
Hartmut Holzgraefe
050e86fde4
it is still to early in the morning for coding :(
2003-02-28 07:57:00 +00:00
Hartmut Holzgraefe
80d267e271
make sure that GNU extensions exist for fnmatch()
2003-02-28 07:52:23 +00:00
Ilia Alshanetsky
912bef379d
Fixed compiler warning.
2003-02-27 23:53:55 +00:00
Wez Furlong
0cec0bd8a9
streams.c -> streamsfuncs.c
...
# argh!
2003-02-27 22:48:13 +00:00
Wez Furlong
493ef36299
Update win32 build.
...
Since msvc sucks, I had to rename ext/standard/streams.c to ext/standed/streamsfuncs.c
2003-02-27 22:43:51 +00:00
Wez Furlong
5def83df0b
Move streams specific stuff from ext/standard/file.c -> ext/standard/streams.c
...
Move win32 select implementation into win32/.
Will update win32 build in a moment.
2003-02-27 22:23:39 +00:00
Ilia Alshanetsky
ea1f34e892
Fixed a bug that would cause filetype() to return "unknown" for
...
non-existent files on Win32.
2003-02-27 20:38:00 +00:00
Wez Furlong
cfd8150b30
Add a generic meta data api for streams.
2003-02-27 19:10:24 +00:00
Wez Furlong
76ebaa6ee7
- Move https:// and ftps:// wrapper registration into the openssl module.
...
- Expose the http:// and ftp:// wrappers as PHPAPI
- Remove unused variables
2003-02-27 18:16:35 +00:00
Wez Furlong
fd61f69077
Another big commit (tm).
...
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
(currently only supports OpenSSL, but could support other SSL toolkits,
and other crypto transport protocols).
Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
removing the link-time requirement for ssl:// and https:// sockets and
streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
there are now a range of possible socket-type streams.
Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.
# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Ilia Alshanetsky
560e33968d
Fixed bug #21410 (fixed handling of NULL or "" files on Win32)
2003-02-27 16:41:23 +00:00
Ilia Alshanetsky
695ae92c97
1) Make the output of system() binary safe
...
2) Solved a memory leak when the return_value variable passed by reference is
not an integer in system()/exec()/passthru().
3) Solved a bug in exec(), which would make it append to the 2nd parameter
(passed by reference) if the parameter is an array instead of overwriting it.
4) Changed the code to use the streams code, resulting in a smaller code base.
5) Various cleanups resulting in reduction of overall code base inside the file
by ~ 1/3.
6) Speed improvements of ~2.5 times compared to previous performance (based on
attached PHP script).
2003-02-26 22:11:12 +00:00
Derick Rethans
424c41a72e
- Added an extra ini setting with which extra commands can be forced to
...
the sendmail deamon on a per-vhost base. The value in this ini setting
will override all extra commands passed as the 5th parameter to mail()
and will work in Safe Mode.
@- Added an extra ini setting (mail_force_extra_paramaters) which forces
@ the addition of the specified parameters to be passed as extra
@ parameters to the sendmail binary. These parameters will always replace
@ the value of the 5th parameter to mail(), even in safe mode. (Derick)
2003-02-26 20:04:16 +00:00
Derick Rethans
17acc55ad0
- Fix proto
2003-02-26 19:34:16 +00:00
Derick Rethans
bc11c47ce6
- Whitespace
2003-02-26 19:25:24 +00:00
Ilia Alshanetsky
aee0c18bde
Made shell_exec() use streams, this simplifies the code and in some cases
...
makes it a little faster too.
2003-02-25 23:52:34 +00:00
Ilia Alshanetsky
bce8bfdae4
MFH (forgot to put this fix into the 5.X tree).
2003-02-25 23:39:57 +00:00
Moriyoshi Koizumi
991da29849
Set fgetss() free from the length parameter
2003-02-25 20:12:18 +00:00
Ilia Alshanetsky
503e49feae
Fixed test.
2003-02-25 16:27:51 +00:00
Ilia Alshanetsky
f29964e2ba
Fixed bug #22414 and added a test case for it.
2003-02-25 16:21:00 +00:00
Ilia Alshanetsky
e8823a205a
Fixed bug #22402 (opening of ftp for read/write could fail due to invalid
...
return code handling).
Solution suggested by jan@jancm.org
2003-02-25 04:20:22 +00:00
Ilia Alshanetsky
862634ffa5
Added locking to streams.
...
Allow PHP to automatically release locks on files when terminating the
stream.
Fixed bugs in the handling of the 3rd optional parameter to flock().
2003-02-25 01:39:06 +00:00
Moriyoshi Koizumi
14db9ea88d
Fixed string.strip_tags filter so it reflects the change on php_strip_tags
2003-02-24 22:41:55 +00:00
Moriyoshi Koizumi
b44b0b80e0
Made fgetss() binary safe too
2003-02-24 22:39:47 +00:00
Moriyoshi Koizumi
8f341f6a19
Fixed possible buffer overflow of php_strip_tags
2003-02-24 22:19:36 +00:00
Moriyoshi Koizumi
385a809694
Made strip_tags() binary safe
2003-02-24 22:01:12 +00:00
Sara Golemon
85a5ef3ec9
Initial re-implementation of userfilters after filterchain redesign by wez. More userspace API to come.
2003-02-24 21:56:19 +00:00
Wez Furlong
088e2692c3
MFB: Bunch of streams related fixes.
2003-02-24 21:40:23 +00:00
Ilia Alshanetsky
4474f9225a
Fixed bug #22355 (PHP would remove folding from Subject & To fields).
2003-02-24 19:41:18 +00:00
Moriyoshi Koizumi
93b6d05bb8
Forgot to fix this part
2003-02-24 16:54:21 +00:00
Moriyoshi Koizumi
f73f94f258
Fixed a signed / unsigned issue.
...
# imagine the case like "\\\xfe" where walk[1] takes a value that is greater
# than 127 in integer...
2003-02-24 16:29:00 +00:00
Moriyoshi Koizumi
171fd93840
Style fix
2003-02-24 16:13:13 +00:00
Ilia Alshanetsky
a3cb589b71
Fixed bug #22382 (fgetcsv did not handle \" correctly).
2003-02-24 03:13:25 +00:00
foobar
c87c4c7bd7
Extra paranoia checks if dn_skipname/dn_expand exist or not
2003-02-24 00:09:18 +00:00
Ilia Alshanetsky
8908faa47f
Revent previous patch, adding of file_write_content() was premature.
2003-02-22 20:35:22 +00:00
Ilia Alshanetsky
d2e2fbcc5b
int/long change.
2003-02-22 20:33:11 +00:00
Andrey Hristov
8c2dbd5f0f
additional speedup for array_shift(). No need to rehash if the removed element's
...
key is not scalar and elements with scalar keys are already well numbered
(sequentially from 0) for some reason. This is the case if the leading
elements have no scalar indexes.
2003-02-22 13:55:11 +00:00
Andrey Hristov
94040a28ce
rehash only in case something is changed.
...
#lowers the execution time in half on my machine on array with 1000 elements
#with nonscalar keys. Maybe it can be optimized further.
2003-02-22 10:54:26 +00:00
foobar
b420beba61
- Fixed bug: #22339
...
# No NEWS, this was bug introduced by Marcus a while ago..
# Not present in php4.3.x branch
2003-02-21 08:45:58 +00:00
Sara Golemon
2002ca0203
Reduce unnecessary filter applications when stream is (read|write) only
2003-02-20 20:05:31 +00:00
Derick Rethans
2bff9cae27
- Fixed testcase... you can never trust on RFCs it seems
2003-02-20 16:15:41 +00:00
Derick Rethans
91766d4b9a
- Fixed copy and paste bug
2003-02-20 10:33:55 +00:00
Derick Rethans
b4b33b11ef
- Also add the optional raw output parameter to md5_file and sha1_file.
2003-02-20 10:32:35 +00:00
Derick Rethans
ead7521e4d
- No need to add the \0 ourselves, the estrndup in STRINGL takes care of
...
that for us.
2003-02-20 06:56:37 +00:00
foobar
6043ee22e8
- Fixed bug #22299 (gethostbyname() crash with non-existing domain on MacOSX)
2003-02-20 05:34:58 +00:00
Ilia Alshanetsky
69094da0e8
Revert accidental commit.
2003-02-20 00:34:03 +00:00
Ilia Alshanetsky
3bff5c0419
Fixed bug #22308 (optimized passthru, code is now ~40 times faster).
2003-02-20 00:32:51 +00:00
foobar
2b90480fa9
scandir -> php_scandir, alphasort -> php_alphasort
2003-02-19 09:27:29 +00:00
Ilia Alshanetsky
a6ef609a37
Fixed bug #22283 (possible crash when opening relative URLs).
2003-02-19 00:49:31 +00:00
Moriyoshi Koizumi
69113a3099
Added string.strip_tags filter.
2003-02-19 00:12:23 +00:00
Moriyoshi Koizumi
6389a79ea5
Fixed memory leaks on conversion failure.
2003-02-18 23:30:36 +00:00
Moriyoshi Koizumi
8793a78fee
Revived convert filter codes
2003-02-18 23:22:49 +00:00
Derick Rethans
d95c41eddb
- Added new parameter to sha1() and md5() which return the digest as
...
binary data. (Original patch by Michael Bretterklieber <mbretter@jawa.at>)
- Added test cases for sha1() and md5() based on the testvectors in RFC 1321
and RFC 3174.
@- Added new parameter to sha1() and md5() which return the digest as
@ binary data. (Michael Bretterklieber <mbretter@jawa.at>, Derick)
2003-02-18 20:31:19 +00:00
Moriyoshi Koizumi
89caaeb87c
Fixed bug #21708 (ucfirst() trouble again)
...
# this bug is related to bug #21689
2003-02-18 18:11:34 +00:00
Moriyoshi Koizumi
d4e9d48b18
Fixed bug #21689 (fgetcsv suppresses some characters before a separator)
...
The fix is suggested by Masahiro Nakayama <masa@sfc.wide.ad.jp>
# is* functions expect their argument to be an integer in range of 0-255
2003-02-18 15:15:22 +00:00
Wez Furlong
e52aac940f
Implement simple stream support in the ZE scanners.
2003-02-18 09:37:54 +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
foobar
28f4cb18ec
nice() is part of libc, use AC_CHECK_FUNCS instead
2003-02-18 03:22:47 +00:00
Sara Golemon
6fe4ab41f0
Fix stream_filter_(ap|pre)pend to allow attaching on the read and/or write chains. Automagically decide what to do if noone tells us.
2003-02-18 02:53:24 +00:00
Wez Furlong
1e34a6bffc
Add basic test of read filters and read filter chain.
2003-02-18 01:24:41 +00:00
Ilia Alshanetsky
0ad5cac954
By popular demand nice() is renamed to proc_nice().
...
A better error message for proc_nice() failure.
2003-02-18 01:23:51 +00:00
Wez Furlong
32165a5546
Implement new filter API, stage 1.
...
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c
The filters stack has been separated into one chain for read and one chain
for write.
The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
2003-02-18 01:22:21 +00:00
Ilia Alshanetsky
0fd1009fcc
Added nice() function, which allows changing of priority for the current
...
process.
2003-02-18 01:07:57 +00:00
Zeev Suraski
4934744b93
Win32 build improvements
2003-02-17 13:29:59 +00:00
Shane Caraveo
216d1d00a5
you know it's time to get away from the keyboard when you do this.
...
fix my last fix
2003-02-17 06:45:37 +00:00
Derick Rethans
738d4f401f
- Style polizei
2003-02-17 06:35:13 +00:00
foobar
7e9fb9f21f
- Cleaned this mess a bit:
...
. Centralized the functions sunrise/sunset to php_sunrise_sunset
to lessen duplicate code.
. Made wrapper function php_do_date_sunrise_sunset() to lessen
duplicate code.
. Coding style fixes.
. renamed sunfuncs.h -> php_sunfuncs.h
2003-02-17 06:28:07 +00:00
foobar
d3e006eafd
- These results were obviously got with TZ=GMT
...
# also prefixed the test results with the tested option
# so it's easier to see which one fails..
2003-02-17 06:23:22 +00:00
foobar
6b7a822cec
Assuming the results were created in system with Asia/Jerusalem as TZ
2003-02-17 05:51:03 +00:00
Shane Caraveo
eb6b7e80be
fix it the right way
2003-02-17 05:47:56 +00:00
foobar
1c89652590
override precision ini setting
2003-02-17 05:02:05 +00:00
Shane Caraveo
354a7d804b
If you pass NULL, you do not get a NULL value, make sure it is.
2003-02-17 03:26:16 +00:00
foobar
4e3d4e4329
- Let's be consistent with these..
2003-02-17 03:07:33 +00:00
Wez Furlong
f871a58783
Fix compile warning
2003-02-17 00:01:31 +00:00
Wez Furlong
63c95db648
Remove unused vars
2003-02-16 22:33:29 +00:00
Moshe Doron
ea8d11cc87
@ new idate() function.
...
@ new date_sunrise() function.
@ new date_sunset() function.
#since i have no premission updating the win32 project file, i'm sending patch on the list.
2003-02-16 22:28:01 +00:00
Wez Furlong
32c1eafe85
Remove bogus test.
...
Append mode always causes written data to go to the end of the file,
regardless of the current seek position.
2003-02-16 15:42:14 +00:00
Wez Furlong
7e92f636ef
Integrate Shanes patch that allows specifying the cwd and environment
...
for the child process created by proc_open().
2003-02-16 15:38:54 +00:00
Wez Furlong
0a18a9d744
A add much more useful select(2) implementation than is provided by
...
windows sockets. The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.
This change required linking against the winsock2 library. In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default. It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.
Also, add a win32 compatible pipe test when opening a stream from a pipe. This test will only work on NT, win2k and XP platforms. Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered. I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Wez Furlong
27e3d6477f
Add optional signal parameter to proc_terminate.
2003-02-15 17:33:11 +00:00
Wez Furlong
c3c24054e8
Add proc_terminate() function to forcibly kill off a process created
...
with proc_open().
2003-02-15 17:18:57 +00:00
Moriyoshi Koizumi
b069f35022
Fixed bug #22227
...
Added test case for bug #22227
2003-02-15 15:57:31 +00:00
Marcus Boerger
c34fde086b
a little bit slower but somewhat tricky and more flexible and it does not
...
allocate static buffers anymore
2003-02-14 19:43:06 +00:00
Moriyoshi Koizumi
9b49146dc1
Fixed a str_replace() bug similar to bug #22224
2003-02-14 18:59:50 +00:00
Moriyoshi Koizumi
b3a8349191
Fixed bug #22224 (implode changes object references in array)
...
Added test case for the bug
2003-02-14 18:42:36 +00:00
foobar
f9f4644a84
- Don't add libcrypt if the crypt() function is provided already.
...
(by libc, like in HP-UX)
2003-02-14 01:27:15 +00:00
Ilia Alshanetsky
2443adb8b5
Added test case for bug #22187 .
2003-02-13 19:07:20 +00:00
foobar
e6841d6c35
Added test for those different crypt() methods. Hopefully I got the results right.
2003-02-13 18:49:57 +00:00
Ilia Alshanetsky
7fffe4338a
Fixed bug #22207 (e notation in *printf would be missing a 0 when there is
...
no exponent).
Added a test case for the bug.
2003-02-13 17:25:31 +00:00
Ilia Alshanetsky
f8eba6ded2
Added 'x' mode for fopen() used on local files. This mode will create a new
...
file only if a file does not already exist (O_CREAT|O_EXCL).
2003-02-13 14:40:17 +00:00
Wez Furlong
95e7c2e9ed
Use FILE*-less implementation for php://(stdin|stdout|stderr)
2003-02-13 13:43:37 +00:00
Wez Furlong
1c3de808b9
Avoid problems with chunk_size and auto_detect_line_endings.
2003-02-13 13:38:20 +00:00
Wez Furlong
b81ea669a0
cli should be allowed to have the chroot() function.
2003-02-13 13:35:55 +00:00
foobar
a91a14ab16
ws fix
2003-02-13 07:02:53 +00:00
Ilia Alshanetsky
e1802d7228
Fixed bug #22048 (incorrect insertion of session id when tabs are used to
...
separate tag elements).
2003-02-12 14:56:13 +00:00
Ilia Alshanetsky
53f96c8b02
Added strpbrk(), which is essentially a wrapper around C's strpbrk function
...
that allows searching through a string for a character list.
2003-02-11 22:47:26 +00:00
Ilia Alshanetsky
53b7b0eb8c
Merged the flags for the file() function into a single flag.
2003-02-10 22:26:53 +00:00
Wez Furlong
eefe0f1bb0
ZTS fix
2003-02-09 23:11:23 +00:00
Kai Schroeder
eb8bccee56
fix for #17928
2003-02-09 21:44:51 +00:00
Ilia Alshanetsky
f98ea4c46d
Added feature request #9173 (added stream_get_line(), this function will
...
read either the specified number of bytes or until the ending string is
found).
2003-02-09 20:43:05 +00:00
Ilia Alshanetsky
8b5bc3ecd3
Added feature request #17983 (optional parameter to mkdir() that makes
...
directory creation recursive).
Fixed prototype for file() function.
2003-02-09 20:35:54 +00:00
Ilia Alshanetsky
4eae41915f
Added feature request #14097 (option allowing file() command not to include
...
line endings in it's output. As well as another option, which allows blank
lines to be excluded from the output).
2003-02-09 20:05:13 +00:00
foobar
a09e1397c7
Fixed compile failures when ZLIB / PCRE are compiled as shared
...
extensions in same build.
2003-02-09 19:09:52 +00:00
foobar
7d46becbb2
Let this compile even if PCRE is compiled as shared in same build.
2003-02-09 18:47:21 +00:00
Kai Schroeder
e42339a6b4
shane added is_executable() for windows last night
2003-02-09 13:54:01 +00:00
Kai Schroeder
d1338ff914
reverting to version 1.5; shane added is_executable() for windows last night
2003-02-09 13:52:46 +00:00
Kai Schroeder
390799592d
newlines changed
2003-02-09 13:25:23 +00:00
Kai Schroeder
f93b09b2db
getopt() is currently not available on Windows
2003-02-09 13:23:50 +00:00
Kai Schroeder
11e81f89fd
there are no symlinks on Windows
2003-02-09 13:20:17 +00:00
Kai Schroeder
ea9101135f
is_executable() does not exist on Windows
2003-02-09 13:19:23 +00:00
Kai Schroeder
6fa2536252
die() to skip second message
2003-02-09 12:34:55 +00:00
Kai Schroeder
1e24498461
MSVC's mktime() does not examine the existence of a daylight-saving-time zone
2003-02-09 12:28:01 +00:00
Kai Schroeder
745bec1c48
Windows doesn't know timezone CET
2003-02-09 12:22:18 +00:00
Kai Schroeder
93d4e6e5ed
skip for Windows (does not support dates prior to midnight, January 1, 1970)
2003-02-09 12:21:47 +00:00
Kai Schroeder
d6567abbf4
Windows does not support dates prior to midnight, January 1, 1970
2003-02-09 12:20:54 +00:00
Kai Schroeder
8e14c4a89f
test for mktime()
2003-02-09 12:19:02 +00:00
Shane Caraveo
5048f8c60e
is_executable() now available on win32
...
stats can now get information provided by access()
2003-02-09 03:49:43 +00:00
foobar
b7a9ef8d80
style & ws fixes
2003-02-08 15:26:17 +00:00
Sara Golemon
3631b28f44
chunk_size should always be reduced to 1 while scanning response headers to avoid buffering the actual stream prior to any read calls.
2003-02-07 23:44:58 +00:00
Ilia Alshanetsky
67b19b08e3
Added str_split() function. This function can be used to break down a
...
string into an array.
2003-02-07 21:36:18 +00:00
Ilia Alshanetsky
b1a6778fe5
Added get_browser() function. This function can be used to fetch the headers
...
sent by the server when a request is made for a given URL.
2003-02-07 21:33:35 +00:00
foobar
20f9b6d02c
- Fixed bug #22088 (array_shift() leaves next index to be +1 too much)
2003-02-06 15:27:53 +00:00
foobar
073a80fbcc
fix the test
2003-02-06 15:22:41 +00:00
foobar
102f8cf4c1
Added testcase for bug #22088
2003-02-06 15:04:53 +00:00
Ilia Alshanetsky
f12a6b7663
Added array_walk_recursive() function that can apply array_walk recursively
...
to an array.
2003-02-05 17:56:08 +00:00
Zeev Suraski
3a1a209baf
Updates reflecting infrastructure changes
2003-02-04 13:12:48 +00:00
Ilia Alshanetsky
0d2368554a
Fixed bug #22017 (non descriptive error to appear when timestamp passed to
...
date() has value < 0. Win32 does not support timestamps prior to midnight
(00:00:00), January 1, 1970).
2003-02-03 22:48:26 +00:00
Ilia Alshanetsky
d89c38961b
Make putenv() return a proper error rather then NULL when invalid argument
...
is passed.
2003-02-03 21:48:36 +00:00
foobar
07a9729071
- Fixed bug: #21998 (array_pop() did not reset the current array position)
...
# This behaves now same as in PHP 4.2.3
2003-02-03 16:57:02 +00:00
foobar
7147949a4e
Correct description of the problem
2003-02-03 16:52:04 +00:00
foobar
be83a02b8c
This cause some warning/error in AIX
2003-02-03 13:08:08 +00:00
foobar
bb97dfaccb
Added test for bug #21998
2003-02-03 06:43:08 +00:00
Sebastian Bergmann
7ed0972683
Fix warning.
2003-02-02 18:50:42 +00:00
Zeev Suraski
53060ef869
Fix phpinfo() display of Zend extensions
2003-02-02 15:53:04 +00:00
Marcus Boerger
3e675c1cf4
avoid warnings
2003-02-01 23:38:29 +00:00
Marcus Boerger
27ccc66518
@Added XBM support for GetImageSize(). (helly)
2003-02-01 23:14:13 +00:00
Wez Furlong
84f83e8559
Don't assume that objects have class entries (in the ZE1 sense) when
...
determining the class name.
Additionally, don't assume that objects have a properties hash either.
2003-02-01 03:52:31 +00:00
Sascha Schumann
bea6ff5183
Unbreak $Id tag
2003-01-31 16:24:12 +00:00
Sara Golemon
65146ceb26
Unify str_replace and str_ireplace using INTERNAL_FUNCTION_PARAM_PASSTHRU -- reduce codebase/maintenance complexity
2003-01-30 20:09:19 +00:00
Sara Golemon
37ff98978b
Feature Request # 5919 - Addition of str_ireplace()
...
Also removed deprecated BM str replace menthod
Also rewrote php_str_to_str to use more processor/memory efficient method (ilia)
2003-01-30 05:00:41 +00:00
Edin Kadribasic
ca0b63e420
Enable embedded code using sapi/embed to use dl().
2003-01-29 15:39:10 +00:00
Harald Radi
f8e014b228
MFPHP_4_3
2003-01-29 00:49:09 +00:00
Ilia Alshanetsky
e6170c0b30
Added part of strpos commit that never made it in for some reason.
...
# Thanks Pollita.
2003-01-29 00:07:01 +00:00
Frank M. Kromann
0e38fedcd7
Fix the setting of computer name and processor type for php_uname() on Win32
2003-01-28 05:02:12 +00:00
Ilia Alshanetsky
2d0f432490
Added scandir() function, which allows quick retrieval of all files &
...
directories within the specified path and sort the output in alphabetical
or reverse alphabetical order.
2003-01-28 01:48:57 +00:00
Edin Kadribasic
c7441b2379
Fixed bug #21597 (made glob() understand windows paths)
2003-01-27 16:29:47 +00:00
Ilia Alshanetsky
758ea308a9
Fixed compiler warning.
2003-01-25 00:23:03 +00:00
Ilia Alshanetsky
6efe008598
Fixed compile warning.
2003-01-24 16:45:34 +00:00
Ilia Alshanetsky
38ad0e9104
zend_error -> php_error_docref.
2003-01-24 16:29:40 +00:00
Andrey Hristov
600fce5890
Resolving problem on OSF1 and probably other
...
64 bit platforms. Thanks for the feedback of Magnus (novell kiruna se).
2003-01-24 13:18:08 +00:00
Andrey Hristov
1d0214bee4
Adding cast.
2003-01-24 12:19:59 +00:00
Moriyoshi Koizumi
8dfb2df649
Renamed the test name as per the convension
2003-01-23 19:21:51 +00:00
Moriyoshi Koizumi
6fc22aa5d9
Test name formatting
2003-01-23 19:07:25 +00:00
Anil Madhavapeddy
dea44dfc9a
typo
2003-01-22 20:41:28 +00:00
Ilia Alshanetsky
8a9e09a44a
ARG_COUNT(ht) -> ZEND_NUM_ARGS().
2003-01-21 14:56:40 +00:00
Derick Rethans
f1ba2137c0
- Add credits for Magnus
2003-01-20 12:34:07 +00:00
Moriyoshi Koizumi
dfbfa1a36f
Improved the patched part to prevent further potential bugs
2003-01-19 17:23:48 +00:00
Harald Radi
b51b6f0fbf
ini patch to allow 'entry[] = value' entries
2003-01-19 12:18:46 +00:00
Moriyoshi Koizumi
a1e6457561
Fixed bug #21744(21741)
...
Added test case for the bug
2003-01-19 11:32:54 +00:00
Ilia Alshanetsky
3d8e54f3a2
Changed php_error to php_error_docref.
2003-01-19 00:45:53 +00:00
Derick Rethans
add3ec4e0b
s/4.4/5.0
2003-01-18 22:33:56 +00:00
Ilia Alshanetsky
71e9f8cdd5
Removed pointless memory allocation checks.
2003-01-18 20:01:46 +00:00
Moriyoshi Koizumi
94c25df592
WS
2003-01-18 19:26:01 +00:00
Moriyoshi Koizumi
310397f2ee
Fixed typo
2003-01-18 19:02:21 +00:00
Moriyoshi Koizumi
2aa7bf8d8b
Added test case for bug #21730
2003-01-18 18:59:27 +00:00
Moriyoshi Koizumi
e23fead99f
Tons of WS fixes
2003-01-18 18:49:47 +00:00
Moriyoshi Koizumi
21b4499953
Fixed bug #21726 and #21730
2003-01-18 18:31:13 +00:00
Andrey Hristov
309ef518fc
Renamed get_memory_usage() to memory_get_usage() (per Andi's advice)
...
This doesn't break any BC.
2003-01-18 15:03:01 +00:00
Wez Furlong
7002a39f97
Fix potential problem for 64-bit architectures.
2003-01-18 14:10:22 +00:00
Derick Rethans
39aa3a5d98
- Fixed memleak in fscanf().
2003-01-18 13:55:58 +00:00
Derick Rethans
a50e9acd8e
- Skip test if the function to test is not available
...
#- Perhaps we need some infrastructure for this...
2003-01-18 13:53:25 +00:00
Ilia Alshanetsky
054826b192
Added missing test result.
2003-01-17 23:57:43 +00:00
Moriyoshi Koizumi
f71ef5e091
Fixed a quoted printable decoder so that it would conform to RFC2045.
2003-01-17 20:00:31 +00:00
Marcus Boerger
973c5fa1ec
fix jp2 detection and add testfile
2003-01-17 18:51:30 +00:00
Derick Rethans
cce2ffed8a
- Fixed a bug that made that no newline was displayed when there was no value
...
for a row.
2003-01-17 18:07:10 +00:00
Moriyoshi Koizumi
f94cbfe52b
Significant speed enhancements. I was underestimating the power of recent
...
CPUs :)
2003-01-17 09:04:02 +00:00
Moriyoshi Koizumi
93481ce9b8
Finally fixed a qp encoder bug that line break characters that appear exactly
...
at the end of the chunk lost in the output.
# I bet no more problems will occur in quoted-printable encoder.
# But I recognised the counterpart is still buggy due to RFC2045-incompliance.
2003-01-16 20:59:07 +00:00
Marcus Boerger
1dabcd4dad
- JPEG 2000 support
2003-01-16 19:46:12 +00:00
Marcus Boerger
8958762de6
- corrected error in file detection for very small files
...
- JPEG 2000 support, mostly Adam Wright <adam@elysium.ltd.uk>
@Enhanced jpeg 2000 support for GetImageSize(). (marcus, Adam Wright)
2003-01-16 19:45:26 +00:00
Edin Kadribasic
d4e143b8be
Fixed bug #21648
2003-01-16 13:19:50 +00:00
Wez Furlong
a3a2dcd8a9
Relieve scripts of the burden of ensuring that all pipes are closed prior
...
to calling proc_close().
Implement proc_get_status(resource $process) which returns an array of
information about a process created with proc_open().
The information includes:
array(
"command" => string "name of the command",
"pid" => long process identifier,
"running" => bool true if the process is still running
"exitcode" => long exitcode if the process exited
"signaled" => bool true if the process was signaled
"termsig" => long signal number if signaled
"stopped" => bool true if the process is stopped
"stopsig" => long signal number if stopped
);
2003-01-15 18:54:03 +00:00
Wez Furlong
1a314027d3
- Move proc_open code to a source file of it's own.
...
- Tidy up that netware mess by performing a configure check which will
define the symbol PHP_CAN_SUPPORT_PROC_OPEN if PHP can support proc_open.
- Protected the proc_open specific code with #ifdef PHP_CAN_SUPPORT_PROC_OPEN
so that user-space scripts can use function_exists and react accordingly.
** Heads Up Win32: You need to add ext/standard/proc_open.c to the DSP and
** #define PHP_CAN_SUPPORT_PROC_OPEN in the w32 config header.
2003-01-15 16:29:00 +00:00
Moriyoshi Koizumi
fdf0768d4e
Fixed a qp encoder bug that the constructor sometimes fails if
...
line-breaking mode is off.
2003-01-15 15:05:17 +00:00
Andrey Hristov
7866f02260
added function get_memory_usage(). available only when PHP is compiled
...
with --enable-memory-limit
2003-01-14 18:26:47 +00:00
Moriyoshi Koizumi
e5c5412777
Added a new option "force-encode-first" to the quoted-printable encoder
...
as per Wez's request. If enabled, the encoder forcefully does qp
tranformation on every first character of lines in incoming stream.
2003-01-14 16:42:18 +00:00
Moriyoshi Koizumi
bde6801add
Made php_quot_print_decode() RFC2045-compliant
...
# this function is only used in iconv extension and the corresponding
# userland function doesn't use it, so I don't see any BC issue here.
2003-01-14 15:14:11 +00:00
Moriyoshi Koizumi
a0be48c109
Fixed small memory leak that occurs when the invalid line length is passed
...
to the qprint ctor.
2003-01-14 01:27:57 +00:00
Moriyoshi Koizumi
121e625977
Fixed quoted-printable encoder so that it produces RFC2045 complicant
...
output. As per this specification requirement, the constructor now accepts
three options: binary (boolean), line-len (uint), line-break-chars (string).
2003-01-14 01:23:35 +00:00
Andrey Hristov
1cdc956637
added array_combine().
...
Creates an array by using the elements of the first parameter as keys and
the elements of the second as correspoding keys. Error is thrown in case
the arrays has different number of elements. Number of elements 0 is not
valid for both parameters.
2003-01-13 18:12:23 +00:00
Moriyoshi Koizumi
78f527e2b7
Fixed a silly segfault bug caused by lack of strict type checking
2003-01-13 11:00:22 +00:00
Moriyoshi Koizumi
ab71e2cbaa
. Implemented a common filter parameter parsing function.
...
# For example "base64-encode.line-break-chars=--,base64-decode.blah=foobar"
# will be parsed and splitted into a zval array as
# array(2) {
# ["base64-encode"]=>
# array(1) {
# ["line-break-chars"]=>
# string(2) "--"
# }
# ["base64-decode"]=>
# array(1) {
# ["blah"] =>
# string(6) "foobar"
# }
# }
. Added automatic line-breaking feature for base64 encode filter. This
can be turned on by putting a option entry "base64-encode.line-length"
to the filter parameters.
2003-01-13 10:21:40 +00:00
Moriyoshi Koizumi
1fec8e3d13
Fixed a bug of the base64 decoder that a sequence of intervening
...
characters that are supposed to be ignored by the decoder cause output
corruption.
2003-01-12 21:05:22 +00:00
Stanislav Malyshev
98175957a7
ZE2 compatibility
2003-01-12 18:42:16 +00:00
Sebastian Bergmann
f37cb1c617
ZTS fixes.
2003-01-12 14:47:18 +00:00
Stanislav Malyshev
a7e14749e7
Disable ZE2-incompatible parts
...
# This should be rewritten for ZE2 anyway...
2003-01-12 14:43:04 +00:00
Stanislav Malyshev
bcc1e5a74e
remove unneeded var
2003-01-12 13:50:17 +00:00
Moriyoshi Koizumi
a88173bf86
Fixed infinite loop bug when an invalid quoted-printable escape sequence
...
appears in the streem.
2003-01-12 13:46:11 +00:00
Moriyoshi Koizumi
b1e8631986
Fixed error msg format so it correctly reports the actual filter name
2003-01-12 13:41:35 +00:00
Moriyoshi Koizumi
aa41ab285a
. Updated quoted-printable filter by a neater implementation.
...
. Changed emalloc family functions to pemalloc ones for persistent filters.
. Changed base64 and quoted-printable filter names to "convert.base64-encode",
"convert.base64-decode", "convert.quoted-printable-encode", and
"convert.quoted-printable-decode" respectively for the consistency that
may be requested later.
2003-01-12 12:48:13 +00:00
Moriyoshi Koizumi
7fa0970567
Reverted because correct decision has not been made yet.
2003-01-11 23:05:19 +00:00
Moriyoshi Koizumi
b66b92e996
Reduced warnings in ZE2 build
2003-01-11 22:32:19 +00:00
Moriyoshi Koizumi
dd2ad168e1
Reduced compiler warnings in ZE2 build
2003-01-11 22:17:37 +00:00
Ilia Alshanetsky
8facc65202
Added stripos() & strripos() functions.
...
Added 3rd parameter (offset) to strrpos().
2003-01-11 17:52:38 +00:00
Wez Furlong
cf9f784ecd
Fix the number format fix when the number of decimal places is 0.
...
# Thanks to Edin for his telepathy!
2003-01-10 13:32:24 +00:00
Moriyoshi Koizumi
380928e6bf
Reduced compiler warnings
2003-01-10 04:44:21 +00:00
Ilia Alshanetsky
5413a66cbb
CS fixes
2003-01-09 23:23:32 +00:00
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