Commit Graph

2519 Commits

Author SHA1 Message Date
Andi Gutmans
b4146638f0 - Fix TSRMLS_* stuff 2002-07-08 18:29:54 +00:00
Derick Rethans
728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Derick Rethans
bd356fd0b9 Unify error messages 2002-07-08 11:52:57 +00:00
Derick Rethans
fca0231206 - Add warning to is_*() functions if more than one argument was passed 2002-07-08 11:50:01 +00:00
Derick Rethans
392a452c80 Silence warning 2002-07-08 07:33:22 +00:00
Derick Rethans
cc920570fd Unify error messages 2002-07-08 07:32:59 +00:00
Derick Rethans
7faa669915 - Fix for bug #14580: Made key() binary safe 2002-07-08 07:02:55 +00:00
Sterling Hughes
a6d815fb7c fix win32 build 2002-07-07 21:51:25 +00:00
Sebastian Bergmann
72e7e4afd9 Fix warning. 2002-07-07 08:19:36 +00:00
Stig Bakken
c6ec881953 * fix segfault in case of odd version numbers 2002-07-05 01:00:05 +00:00
Stig Bakken
8b4a25ec13 (PHP version_compare) added "alpha" and "beta", make tests pass 2002-07-05 00:55:02 +00:00
Frank M. Kromann
fd348068f4 Adding missing prototype 2002-07-03 18:23:24 +00:00
Sascha Schumann
9c876ea01a Add sapi_header_op interface which supersedes the sapi_add_header and _ex
calls.

Revert the change to the sapi_add_header_ex interface.

Fix various bugs:

1.  header("HTTP/1.0 306 foo");
    header("Location: absolute-uri");

    did not work in combination with several SAPI modules, because
    http_status_line was never properly reset.  And thus, all SAPI
    modules which looked at http_status_line ignored the changed
    http_response_code.

2.  The CGI SAPI did not send out the HTTP status line at all, if
    http_status_line had not been set explicitly by calling
    header("HTTP/1.0 200 foo");
2002-07-03 10:42:31 +00:00
Derick Rethans
c73733c59a - Fix windows build
#- I could not test this, please try!
2002-07-03 06:45:01 +00:00
foobar
980d7a11a9 Fix the nasty crash. And Sterling..test next time before you commit? 2002-07-03 03:18:55 +00:00
Frank M. Kromann
8a7c339974 Add default arguments to new internal mail function. 2002-07-02 23:46:15 +00:00
Sterling Hughes
d4512030bb use access instead of manually determining file permissions.. 2002-07-02 21:02:34 +00:00
Derick Rethans
f7cab95a7d - Be nice to users and allow them to check if the mail was send 2002-07-02 14:22:22 +00:00
Derick Rethans
0d61ab3814 - Disable 5th parameter to mail in safemode
@- Disabled the fifth parameter to the mail function in safemode. (Derick)
2002-07-02 13:56:47 +00:00
Derick Rethans
7b7608d630 - Fix for bug #15547 (Patch by Justin Garrett <usjgarrett@byu.edu>) 2002-07-02 06:16:35 +00:00
Derick Rethans
d73eed9210 - No C++ comments 2002-07-01 18:52:30 +00:00
Sascha Schumann
71a603ea32 Fix some 8bit issues with IRCG nickname encoding and
Change the underlying interface of smart_str to accept unsigned char.
2002-06-29 18:46:49 +00:00
Derick Rethans
1bf9b3d736 - Fix for bug #17654 2002-06-29 15:39:41 +00:00
Thies C. Arntzen
5a0c283700 fix leak 2002-06-29 11:13:03 +00:00
Sander Roobol
609e134871 Update configure line in phpinfo() after re-running configure without
running make clean first, bug #18012.
2002-06-27 10:01:06 +00:00
Derick Rethans
ea303541f8 - And the SAPI too 2002-06-26 18:58:49 +00:00
Derick Rethans
3696bc781a - Update credits 2002-06-26 18:58:25 +00:00
Andi Gutmans
1f58a8f087 - No idea why this wasn't crashing before. 2002-06-26 07:36:01 +00:00
Marcus Boerger
43ec2dfa59 bits/channels for gif 2002-06-25 21:22:14 +00:00
Marcus Boerger
ba6498e4c5 missing return value 2002-06-24 22:00:22 +00:00
Marcus Boerger
cccc4e3c5a register IMAGETYPE_<xxx> constants in image.c as they are needed
there.
2002-06-24 19:36:26 +00:00
Marcus Boerger
48bdf08edb @GetImageSize now allways set fields unknown to 0 and new Imagetype
@iff. (Marcus)
2002-06-24 19:19:08 +00:00
Marcus Boerger
1f56d4ba08 -imagetype2mimetype renamed to image_type_to_mime_type 2002-06-23 00:43:11 +00:00
Marcus Boerger
d782c712ca -exif version
-missing constant (and notice)
-corrected error messages
2002-06-22 23:43:16 +00:00
Marcus Boerger
c8f1529d08 @GetImageSize now returns additional index 'MimeType' and new function
@imagetype2mimetype to convert php imagetypes to mime-types. (Marcus)
#the reason why i export php_imagetype2mimetype is that i use that for
#exif, too. Followup example will explain why.
2002-06-22 18:14:39 +00:00
Marcus Boerger
d4b1909afe ws fix 2002-06-22 17:09:28 +00:00
Derick Rethans
6869cb3f5a - Added a new parameter to the header() function which overrides the HTTP
response code.
@- Added a new parameter to the header() function which overrides the HTTP
@  response code. (Derick)
2002-06-21 09:31:21 +00:00
Sander Roobol
3d1612c2fb Made the API versions appear better on phpinfo(); 2002-06-19 13:24:01 +00:00
Stig Venaas
7853832234 Made array_unique() always keep the first occurrences of duplicates,
making the behavior easier to understand, and maybe more useful.
2002-06-18 19:37:59 +00:00
Jan Lehnardt
df226a54d9 - WS-fixes 2002-06-18 13:16:33 +00:00
Hartmut Holzgraefe
303852b42e - fixed bug in enclosure handling (was still hardcoded to '"' in one place)
- added possibility to pass empty enclosure if you really don't want one
2002-06-18 12:16:27 +00:00
Sander Roobol
ace4a23dfc Fixed stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
# this time without cvs messing up and aborting, hopefully :)
2002-06-18 11:51:06 +00:00
Sander Roobol
07975157eb Fix stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
2002-06-18 11:42:21 +00:00
Derick Rethans
ba5257a2ec - Fix for bug #16065 2002-06-18 11:09:21 +00:00
Edin Kadribasic
67689bd557 ZTS fix. 2002-06-18 00:14:52 +00:00
Edin Kadribasic
fb6bcda13b Check for +/- infinity in base_convert (bug #14807). 2002-06-18 00:04:33 +00:00
Andrei Zmievski
a347ed559b Applied fix for #17764.
@- Fixed a crash in ereg_replace() when backreference number was greater
@  than the number of subpatterns. (oliver@billix.franken.de)
2002-06-17 15:10:22 +00:00
Hartmut Holzgraefe
efdde5efe5 making printf/sprintf locale-aware without external dependencies 2002-06-17 11:50:25 +00:00
Hartmut Holzgraefe
00b667b61b fixed return types for ucwords/ucfirst when passed an empty string 2002-06-17 11:37:49 +00:00
Stefan Esser
984b48b009 Fixed Bug #17790
- link and symlink now check uid and open_base_dir for link and its target
2002-06-16 21:24:15 +00:00
Hartmut Holzgraefe
0170e42763 reverted patch depending on not yet commited work 2002-06-16 21:22:10 +00:00
Hartmut Holzgraefe
7686d43737 make sprinf() locale-aware (Bug# 12647) 2002-06-16 13:14:21 +00:00
Sebastian Bergmann
596859eb44 Remove unused local variables. 2002-06-14 05:42:08 +00:00
Stefan Esser
2eb859842b Fixed: possible bufferunderrun (worst case == invalid free bytes counter)
Fixed: isXXXX macros need (unsigned char) cast

Fixed: bug#17746 - control chars are now filtered within "to" and "subject" parameters
2002-06-13 18:54:45 +00:00
foobar
01dff4d97a - Fixed bug #17669. PG(magic_quotes_runtime) wasn't reset for each request. 2002-06-12 17:25:48 +00:00
Hartmut Holzgraefe
808dd7dd5f fix for bug #10616 -> mktime() with negative date offsets not working on MacOSX 2002-06-12 15:35:27 +00:00
Jason Greene
c6a36d585b @Impelemented timeout functionality, and fixed error handling of fsockopen() on win32
Also fixed error handling on unix (micropatch)

Closes Bug #14740
2002-06-11 03:55:28 +00:00
Jan Lehnardt
a8de8ec90c - whitespace fix 2002-06-10 16:34:25 +00:00
Harald Radi
8e19555608 fix the build 2002-06-10 12:21:58 +00:00
Markus Fischer
f9936a8459 - Fix proto. 2002-06-10 10:28:33 +00:00
Andrei Zmievski
7f4c12b006 Fix bug #7045: shuffle() now provides consistent distribution of values
in the array.
2002-06-10 02:28:32 +00:00
Andrei Zmievski
5f3a9ebf13 Make RAND_RANGE() an API macro. 2002-06-09 04:26:36 +00:00
Markus Fischer
0cd40c2808 - Since streams are always enabled, instead of just printing 'enabled' we tell
what streams are currently registered.
2002-06-08 10:25:44 +00:00
Rasmus Lerdorf
ca9c4270f8 Make sure len is defined here 2002-06-03 18:26:27 +00:00
Edin Kadribasic
e7ab5766d6 Fixed array_rand() on ZTS platforms.
@- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
2002-06-03 17:49:48 +00:00
Harald Radi
d3383bab2d added wez to the com extension 2002-05-31 10:06:19 +00:00
Stig Bakken
90efd3abe6 @Fix segfault in version_compare() (Stig) 2002-05-26 12:01:30 +00:00
Sander Roobol
b80c27f7ae Fix <head> and <body> tags in phpinfo() output (#17411) 2002-05-24 17:25:40 +00:00
Derick Rethans
de2c71e7cb - Added support for compressed SWF (Flash MX) files to getimagesize().
(Fixes feature request #17272).
@- Added support to getimagesize() for compressed Flash MX files. (Derick)
2002-05-23 21:48:27 +00:00
Andi Gutmans
fc059f5e40 - Fix typo 2002-05-23 14:28:14 +00:00
Wez Furlong
e202ad5c8b Add simple test case for proc_open 2002-05-23 10:46:06 +00:00
Wez Furlong
4fd00c9502 Fix (stupid) segfault. #17379 2002-05-23 10:17:07 +00:00
Derick Rethans
708f980389 - Fix unchecked return values with parameters to proc_open. (Fixes
bug #17375)
2002-05-23 07:52:03 +00:00
Derick Rethans
c37d2a97ac - Fix errormessage and whitespace 2002-05-23 07:08:25 +00:00
Yasuo Ohgaki
b768cf0322 Added 4th parameter to specify enclosure character. Patch by Dean Richard Benson <dean@vipersoft.co.uk>
Spit more meaningful error messages when delim and/or enclosure char is null.
2002-05-23 07:03:43 +00:00
Markus Fischer
720a890f84 - ZTS gotcha 2002-05-20 17:41:35 +00:00
Markus Fischer
96bf2d1deb - Add open_basedir check for all functions using php_stat() (filesize, stat,
etc), closes #11563.
2002-05-20 17:18:18 +00:00
Edin Kadribasic
544694255a Added glob() support for windows. 2002-05-19 14:32:24 +00:00
Markus Fischer
25a616d7aa - Fix portability issues with empty results on Linux and FreeBSD, add safe_mode
check and simplify code.
# Hartmut, what was the VCWD check for ?!
2002-05-18 13:31:31 +00:00
Cliff Woolley
34d471d22e Only the last cookie was getting set. (You can have
more than one Set-Cookie: header, as indicated by
http://wp.netscape.com/newsref/std/cookie_spec.html.)

PR: 16626
Submitted by: regina@hitel.net
2002-05-17 07:10:19 +00:00
Preston L. Bannister
1fdff888ce Remove leading "./" from include filenames as in PHP this defeats include_path. 2002-05-16 21:53:18 +00:00
Preston L. Bannister
6b2ab5f66d Adjust dirname() on Win32 to match CWD per drive semantics. 2002-05-16 16:04:45 +00:00
Rasmus Lerdorf
adf701a3ef Grr.. I keep leaving my debug in... 2002-05-16 14:42:22 +00:00
Rasmus Lerdorf
5d286e21ea Fix for #17271
@ Fix crash bug in stripslashes() when working in sybase mode (Rasmus)
2002-05-16 14:41:15 +00:00
foobar
2f12941fac - Made all is_*() functions to return only boolean values.
- Killed the "file not found" error for is_link(). (finally..)
2002-05-16 01:07:21 +00:00
Markus Fischer
9b86cff931 - Adjust for improved error messages from win32/sendmail.c 2002-05-14 20:43:48 +00:00
Rasmus Lerdorf
f81ec94ac0 Make sure newtime is never NULL 2002-05-13 18:11:27 +00:00
Zeev Suraski
1bfb3595a8 - Fix a buglet in printing of GPCSE arrays
- Remove indirect access
2002-05-13 17:43:04 +00:00
Andrei Zmievski
1668570e4d Changing email address. 2002-05-13 17:28:38 +00:00
Zeev Suraski
2260e1742d - Centralize html_puts() again
- Revolutionize phpinfo()'s speed
2002-05-13 08:46:24 +00:00
Rasmus Lerdorf
93af4bdfb7 Change safe-mode rule for rmdir() to match unlink() - allow is target
is opened by caller or in a directory owned by caller
@ Minor fix to rmdir() under safe-mode (Rasmus)
2002-05-12 15:59:42 +00:00
Sascha Schumann
feaa12a9bf Use string_len information 2002-05-12 14:50:54 +00:00
Sascha Schumann
a769454d79 reenable php_html_puts 2002-05-12 14:48:22 +00:00
Rasmus Lerdorf
465b2d54db Another safe-mode fix. parse_ini_file() did not check
@ safe-mode fix for parse_ini_file()  (Rasmus)
2002-05-11 19:19:49 +00:00
Rasmus Lerdorf
9cbcc9b822 show_source() safe-mode fix
@ show_source() was evading safe-mode - fixed (Rasmus)
2002-05-11 18:35:59 +00:00
Zeev Suraski
bf97148978 Centralize html_puts() logic - php_html_puts() remains as an API wrapper 2002-05-11 12:41:33 +00:00
Derick Rethans
f58ad95c00 - Add PHP_API_VERSION too 2002-05-09 11:56:52 +00:00
Derick Rethans
7b3ce60a23 - Show both API nos 2002-05-09 11:47:37 +00:00
Derick Rethans
31d1fac578 - Forgot one 2002-05-08 05:19:27 +00:00
Frank M. Kromann
c75e794ebe Kill a compiler warning on Win32 2002-05-08 03:56:43 +00:00
jim winstead
51e2ea5ed2 fix problem with mkdir() on freebsd 2002-05-06 17:31:22 +00:00
Wez Furlong
a03d09e2d9 Add support for remaining entities in HTML 4 for the UTF-8 encoding in
htmlentities/htmlspecial chars.
This is a fix for for #17008.
# I would *really* appreciate it if someone with a good eye could verify
# that all the entities are there and are correctly numbered; I've checked
# it three times, but it's best to be sure.
2002-05-05 23:06:39 +00:00
Stanislav Malyshev
b67bafefa5 Return right exit status 2002-05-05 17:14:12 +00:00
Thies C. Arntzen
5d177788ea touch 2002-05-05 16:40:20 +00:00
Thies C. Arntzen
23251ebd1a re-add accidentily nuked session_adapt_url() 2002-05-05 16:39:49 +00:00
Sascha Schumann
67d00f8c1d sync 2002-05-05 02:07:33 +00:00
Sascha Schumann
c8f884fac8 the output buffer is flushed during request shutdown before it
reaches our rshutdown, so it is safe to delete the contents of
the url rewriter variables here.
2002-05-05 02:07:16 +00:00
Sascha Schumann
d41773e8b6 update 2002-05-04 18:34:29 +00:00
Sascha Schumann
9743860d35 simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each
URL/form.

also fix an unconditional segfault in rshutdown due to efree'ing
a static char *.

remove remove_var, add reset_vars.  move the function declarations
into the right header file.
2002-05-04 18:33:13 +00:00
Sascha Schumann
ebfff2df7e ret set but unused 2002-05-04 18:11:36 +00:00
Sascha Schumann
74b09cbcf8 c set but unused 2002-05-04 17:41:51 +00:00
Sascha Schumann
34b899e2da inheader set but unused 2002-05-04 17:41:11 +00:00
Sascha Schumann
ea84524bc2 block_ended/opposite_target were set but never used 2002-05-04 17:38:45 +00:00
Sascha Schumann
a6c3ce15ae don't emit code for version 2002-05-04 17:36:58 +00:00
Sascha Schumann
1f09644ff7 Fix linkage of symbols 2002-05-04 17:26:45 +00:00
Sascha Schumann
9e91566179 entry_length was set but never used 2002-05-04 17:24:08 +00:00
Sascha Schumann
01c980980c update 2002-05-04 17:17:54 +00:00
Sascha Schumann
2438488c68 rval_temp was declared but never used 2002-05-04 17:17:43 +00:00
Sascha Schumann
140158734f redirected is set but never used 2002-05-04 17:16:28 +00:00
Sascha Schumann
62c54fca9f include url.h 2002-05-04 17:15:09 +00:00
Sascha Schumann
2a4dea6c18 include url.h to pull in declaration of php_url_encode 2002-05-04 17:14:56 +00:00
Sascha Schumann
4378214b80 Make this code work on compilers which don't consider the address
of a variable on the stack available at compile time.
2002-05-04 17:12:26 +00:00
Sascha Schumann
e919e7e526 unused var 2002-05-04 16:59:41 +00:00
Rui Hirokawa
fa1904b6e8 fixed a problem that ereg_replace() couldn't match with line stand/end marker. 2002-05-04 11:20:12 +00:00
Thies C. Arntzen
023a381323 forgot 2002-05-03 08:32:03 +00:00
Thies C. Arntzen
9712a4b3c8 @ - Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
@   and remove variables from the URL-Rewriter. (thies)
i have also modified the session module to use this - so it doesn't
need to fiddle with the output-system any more
2002-05-03 08:00:41 +00:00
Frank M. Kromann
bd75b407cf Fixing wrong pointer 2002-05-02 17:36:00 +00:00
Derick Rethans
0c16e026b0 - Add Zend API No. to phpinofo() output 2002-05-02 12:33:03 +00:00
Derick Rethans
8fe3c0c5d4 - Fix String is not zero-terminated error in base64_decode 2002-05-01 20:11:09 +00:00
Stanislav Malyshev
f42bb6cfe4 Fix ZE1 build 2002-04-30 14:45:50 +00:00
Sascha Schumann
6f57419453 Touch file 2002-04-30 13:47:16 +00:00
Stanislav Malyshev
18805e8323 ZE2 compatibility fix 2002-04-30 11:30:07 +00:00
Stanislav Malyshev
3dd6217c0b ZE2 compatibility fixes 2002-04-30 11:29:28 +00:00
foobar
3b1ae7c62a revert last bogus change. There is bug in is_file() 2002-04-30 10:38:06 +00:00
Sebastian Bergmann
eacad68c68 Fix ZTS build. 2002-04-30 04:27:52 +00:00
Wez Furlong
501ed6ccb2 Make use of new flag so that we can buffer http headers when we know that
the stream is not intended to be used in require/include.
2002-04-30 00:30:00 +00:00
Wez Furlong
760573695c Implement user-space funtions to operate on stream contexts. 2002-04-30 00:28:24 +00:00
Wez Furlong
840ed90f2b Fix is_file test.
# Is there a good reason for having the actual test in an include file??
2002-04-30 00:26:49 +00:00
Stanislav Malyshev
11df2122df Add comments for the fix 2002-04-29 16:02:41 +00:00
Stanislav Malyshev
91a78e2974 Fix here too 2002-04-29 16:02:10 +00:00
Stanislav Malyshev
aa10ac9a64 Yet another serialization fix - for incomplete class 2002-04-29 15:44:30 +00:00
Sascha Schumann
71124226d5 Touch generated file
# is it really so hard to remember this?
2002-04-28 21:24:52 +00:00
Stanislav Malyshev
a57381e3bd Fix couple of nasty serializer bugs:
a) When array unserializer encounters less data than it expects (like:
a:1:{}) it crashes. I don't understand exactly why it does, but the fact
is it does. So now it should catch "}" and bail out.
b) When array/object data are serialized, the count is written by hash
count. However, it can be that in-loop check fails and less data than
expected will then be written into the array. Which, due to a), would
crash on unserialize. So now it will write empty entries in place of
entries it cannot serialize (the other choice would be make two passes on
the data, which I don't like).
2002-04-28 16:56:33 +00:00
Thies C. Arntzen
245708b0db timestamp 2002-04-28 11:46:58 +00:00
Thies C. Arntzen
42158ef7c8 revert session_set_userdata - diffent patch will come shortly 2002-04-28 11:45:45 +00:00
foobar
c1c8a4fcfa touch file. Please commit first the .re file and afterwards the .c source. Otherwise, timestamps will be broken. 2002-04-28 04:14:47 +00:00
Yasuo Ohgaki
de4a0ba58e Add test case for file_exist/is_file 2002-04-28 00:05:43 +00:00
Thies C. Arntzen
2dee392e5b part 2 of last commit 2002-04-27 14:08:07 +00:00
Thies C. Arntzen
eb105693b8 @ - added session_set_userdata() which enables you to specify one variable
@   that will be kept in the browser in addition to the session-id. This
@   only works when using trans-sid sessions (no cookie). (thies)
2002-04-27 14:07:52 +00:00
Yasuo Ohgaki
6cc8919dc4 Fixed bug #16861.
touch sets wrong atime or mtime when they are not specified.
touch silently failed when HAVE_UTIME is not defined.
(This needs more consideration. Which platform does not support it?)
# Derick, after HAVE_UTIME issue is resovled, this should be merged.
# or we can just merge 1st problem for now.
2002-04-26 23:46:51 +00:00
jim winstead
79d113ba50 update generated file 2002-04-25 22:12:56 +00:00
jim winstead
bc977dd195 Do not add redundant id attribute. It doesn't make the output any
more standards compliant.
2002-04-25 22:12:38 +00:00
Rui Hirokawa
860e675884 fixed directory access problem when direcory name is encoded in japanese Shift_JIS encoding. 2002-04-25 14:43:40 +00:00
Sascha Schumann
46527b3f5a Touch generated file to increase timestamp 2002-04-25 09:02:01 +00:00
Derick Rethans
8ffd089e02 - Fix for bug #16811 2002-04-25 06:43:11 +00:00
Derick Rethans
4a834dfa44 - Fix for bug 16810 (XHTML compliance) 2002-04-25 06:30:09 +00:00
Andrei Zmievski
5ff970ba7d Fix Bug #14795. 2002-04-24 15:23:43 +00:00
Andrei Zmievski
4fc01022e6 Fix unwanted type conversion in array_merge_recursive (Bug #14990). 2002-04-24 15:01:53 +00:00
Sascha Schumann
303a784822 remove unnecessary casts
# if you mind the bogus warnings, you can either switch the compiler
# or decrease the warning level
2002-04-22 20:42:01 +00:00
Harald Radi
b29604fefc fixes a warning when compiling under win32 2002-04-22 18:02:01 +00:00
Sascha Schumann
d30fc27e5a simplify and improve speed of smart_str_print_long.
also add a variant for unsigned numbers.
2002-04-21 01:17:49 +00:00
Wez Furlong
928bae9cf8 Make scheme part decoding rfc2396 compliant.
Change zlib:// and bzip2:// to compress.zlib:// and compress.bzip2://
Tidy up old socket/network code/comments.
2002-04-19 10:06:41 +00:00
Yasuo Ohgaki
fe6990cc6b Remove compiler warnings 2002-04-19 07:56:41 +00:00
Wez Furlong
b10b24d50c Always initialize wrappers, regardless of PG(allow_url_fopen).
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Wez Furlong
4adb1e58eb Fix declarations (Thanks Sebastian) 2002-04-11 12:13:17 +00:00
Marcus Boerger
4407312d4f thread safe 2002-04-11 08:07:22 +00:00
Marcus Boerger
628e639c08 fix warning 2002-04-11 07:26:53 +00:00
Marcus Boerger
42dc682626 fix testproblem 2002-04-11 06:41:55 +00:00
Wez Furlong
e1d0a14790 Implement stream context and status notification system.
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
foobar
e3cc458d25 - Revert that change. Added a warning about this. 2002-04-08 18:43:35 +00:00
foobar
77c058a06a There's really no point in allowing using the system regex library. 2002-04-08 07:47:17 +00:00
foobar
23a3cc71e3 Using system regex lib seems not to work quite well when compiled with Apache. 2002-04-08 06:45:52 +00:00
Hartmut Holzgraefe
954dbb2d35 fix and regression test for Bug #16473 2002-04-07 19:46:45 +00:00
Wez Furlong
1f2344104f fix for #16469 2002-04-07 10:56:30 +00:00
Zeev Suraski
385b233040 Fix gzip/bz2 builds for Windows 2002-04-05 11:51:43 +00:00
foobar
97ba30ba5c - OS X support for dynamically loaded extensions. (patch by Marko)
# NEWS entry coming up..
2002-04-04 00:24:34 +00:00
Wez Furlong
fea3b0a7f8 fix TS build 2002-04-03 13:47:21 +00:00
Wez Furlong
27d1f7db16 Tidy up win32 implementation of proc_open.
Respect safe_mode_exec_dir.
Implement proc_close and return process return code under win32.
2002-04-03 13:39:35 +00:00
Wez Furlong
a0f165a5cb main/streams.c 2002-04-02 16:46:33 +00:00
Derick Rethans
f71adad3cf - Whitespace 2002-04-02 06:41:23 +00:00
Kirill Maximov
33ed30fce8 (PHP quoted_printable_decode) Fixed CR/LF processing for Windows/OS2
@ Fixed CR/LF processing for Windows/OS2 in quoted_printable_decode (kir)
2002-04-01 17:03:01 +00:00
Derick Rethans
f4447a9cc1 - Fix for bug #14966 2002-04-01 09:19:57 +00:00
Stig Bakken
7f89d8c13a (PHP php_uname) display runtime uname rather than compile-time uname, added
an optional parameter to get single fields (like uname(1))
# Windows version is not tested, and I didn't know how to get
# `uname -n` on Windows, so it's hardcoded to "localhost" for now.
# Windows gurus feel free to fix. :-)
2002-03-29 10:19:23 +00:00
Wez Furlong
4361807185 add test for file_get_contents 2002-03-28 01:20:28 +00:00
Wez Furlong
2539cbc74c Phase 3 of OO wrapper cleanup
# What was phase 2?
2002-03-28 00:49:00 +00:00
Hartmut Holzgraefe
492c837272 fix for Bug #16314 2002-03-27 20:20:57 +00:00
Sander Roobol
9b6a8d2639 Fixed the array-tests. Broke the test up into various smaller tests.
Reduced the test data because it was unmanageable.
# I hope everything is ok :)
2002-03-26 18:17:38 +00:00
Sascha Schumann
fb048880aa outcomment default linking against pam due to no feedback
regarding its purpose
2002-03-26 11:05:18 +00:00
Sascha Schumann
5428e463bd If an argument (<tag val=argument..) was not quoted, leave it that way. 2002-03-26 10:23:33 +00:00
Markus Fischer
f521ae3f30 - Fix bug 11244 (patch by "Tal Peer" <hazgul99@hotmail.com>).
# Sorry for the delay :-)
2002-03-26 07:57:07 +00:00
Wez Furlong
5ee65bd8f5 Phase 1 of wrapper OO cleanup.
# Collecting underpants
2002-03-24 18:05:49 +00:00
Derick Rethans
1f9b519c55 - Remove read_uploaded_file 2002-03-23 23:03:04 +00:00
Hartmut Holzgraefe
e40ce9963e dl is now aware of modules compiled for php <4.1.0
which have a slightly different module_entry structure
2002-03-23 15:37:27 +00:00
Derick Rethans
e2f110d982 - Added read_uploaded_file (patch by Andrew Sitnikov <sitnikov@infonet.ee>) 2002-03-23 14:10:57 +00:00
Derick Rethans
25b42ae3b6 - Fix handling of zero'th argument for sprintf()'s argument swapping code
(Patch by Morten Poulsen <morten@afdelingp.dk>)
2002-03-22 09:09:18 +00:00
Hartmut Holzgraefe
10811cd0d8 getting rid of the warn_not_available alias 2002-03-22 01:10:31 +00:00
Markus Fischer
341af63328 - Use proper macros for php_stream_cast() return values (fixes #16211). 2002-03-21 22:05:40 +00:00
Hartmut Holzgraefe
b00d9a5b2c added fnmatch() and glob() functions
could someone please check if i got the virtual dir stuff right?
2002-03-21 19:18:13 +00:00
Wez Furlong
06f6e47e4c Require that wrappers use <protocol>://<path> to avoid
ambiguities when filenames have ':' characters.
This slightly breaks BC with the old style zlib: wrapper.
2002-03-21 17:02:50 +00:00
Andrei Zmievski
1cf188ae1b Fix compilation when PCRE is disabled. 2002-03-21 15:28:46 +00:00
Sander Roobol
a15c9a31eb Added tests for pow()'ing with broken exponents and some additional test
for count()'ing arrays.
2002-03-21 14:18:30 +00:00
Wez Furlong
a662f012bb Convert the gzfile related functions into aliases for their equivalents
in ext/standard/file.c, so a gzopen()ed file pointer can be used in
fread, fseek etc.
Improved behaviour of zlib stream.
Moved passthru code into streams.c
# I'm not happy about BG(mmap_file)
Nuked gzgetss_state as no longer needed.
2002-03-21 01:11:52 +00:00
Wez Furlong
3dbde95896 Make state parameter of php_strip_tags passed by reference.
Move state tracking to stream structure.
2002-03-20 14:38:13 +00:00
Wez Furlong
659a071e3d Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Markus Fischer
f130bdb59e - Fix for #16176. 2002-03-20 08:17:06 +00:00
Wez Furlong
14a3911866 fix for bug #16168 2002-03-19 17:49:02 +00:00
Wez Furlong
32a4f35580 register some constants for user streams 2002-03-19 14:35:55 +00:00
Wez Furlong
6abe71bebc s/fgetwrapperdata/file_get_wrapper_data/ 2002-03-19 13:33:07 +00:00
Sascha Schumann
3757a81367 Remove trailing ;
The macro can now safely be used in constructs such as

if (..) foo() else bar();
2002-03-19 12:11:46 +00:00
Sascha Schumann
f84167571f touch file. Please commit first the .re file and afterwards the .c source. Otherwise, timestamps will be broken. 2002-03-19 11:39:41 +00:00
Thies C. Arntzen
3550d75d0f fix #12793 - serialize will now spit a notice if the return value of __sleep is
bogus.
2002-03-19 11:25:21 +00:00
Wez Furlong
06712a508a Implement user-space streams.
There's probably room for improvement,
docs will following some time this week.
2002-03-19 03:51:01 +00:00
Wez Furlong
e3a884f552 fix error message which appeared even if no ssl mode was selected 2002-03-18 20:44:15 +00:00
Wez Furlong
c9d5e13738 TSRMLS related work on streams, as discussed with Zeev.
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Wez Furlong
1222d80860 having streams is now the default 2002-03-18 10:44:39 +00:00
Zeev Suraski
a145646e74 Fix build 2002-03-18 09:20:43 +00:00
Sascha Schumann
68d2592f52 Rename HAVE_PHP_STREAM to PHP_HAVE_STREAMS, because
1.) a PHP-specific symbol should be in the php namespace, and
2.) there are multiple streams and the old configure parameter was plural, too.
2002-03-18 08:29:17 +00:00
Sascha Schumann
d74666a648 touch file 2002-03-18 08:22:33 +00:00
Zeev Suraski
73e79322ba Fix the build and all of the outstanding VC++ warnings 2002-03-18 08:05:28 +00:00
jim winstead
349936c93e Fix calculation of output buffer size in wordwrap(). (Thanks to Wez.) 2002-03-18 02:00:57 +00:00
Wez Furlong
d2d8762267 Streams now make more use of the memory manager, so tracking down
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Stefan Esser
cce45de17c move_uploaded_files checks open_basedir now 2002-03-17 20:56:20 +00:00
Harald Radi
65c4e9e0fd removed anoying warnings 2002-03-17 16:45:56 +00:00
Wez Furlong
436e339bc7 Fix for Bug #16121: make unix socket names binary safe.
# Could be applied to 4.2 branch, but I don't have a working copy, and
# I don't think it's amazingly critical.
2002-03-17 13:19:27 +00:00
Wez Furlong
1d3ad85ac2 fix win32 warning and ming leak 2002-03-17 01:58:42 +00:00
Harald Radi
2be6527fc6 fixed TSRM build 2002-03-16 22:08:23 +00:00
Marcus Boerger
f24caf3244 -formatting 2002-03-16 20:12:58 +00:00
Wez Furlong
5d0c53eecf Fix some issues with gzFile and fsockopen. 2002-03-16 18:42:42 +00:00
Wez Furlong
0895998bef s/get_file_contents/file_get_contents/ 2002-03-16 16:52:24 +00:00
Wez Furlong
201446c2b5 Ooops. 2002-03-16 16:14:56 +00:00
Wez Furlong
0447327118 Implement get_file_contents() as discussed (briefly!) by myself, Derick
and Sterling on php-dev some months ago.
It returns the file contents as a string, and uses mmap if possible.
2002-03-16 16:06:18 +00:00
Markus Fischer
ac50b53018 - WS fix. 2002-03-16 15:50:20 +00:00
Markus Fischer
3c52ef676f - Don't forget to close the handle. 2002-03-16 15:42:34 +00:00
Markus Fischer
d4e63bc5bf - Raise warning when trying to execute non-executeable shell
for mail delivery binary.
2002-03-16 12:45:43 +00:00
Stefan Esser
e926db7bfa fixed possible bufferoverflow in get_next_char
malformed input to htmlentities/htmlspecialchars
with utf-8 encoding crashed the server

ex: htmlentities("\xfd...(30times)", ENT_NOQUOTES, "utf-8");
2002-03-16 09:44:30 +00:00
Wez Furlong
636829345e Allow php_stream_copy_to_stream to do nothing when used with code
that calculates a max length of zero. (Thanks again Marcus).
2002-03-16 02:48:35 +00:00
Marcus Boerger
94b6c6e87f -use of corrected stream seek
#thanks to Wez!
#image.c no works again
2002-03-16 02:46:04 +00:00
Wez Furlong
52982c422e This should help with some build problems/warnings under win32.
Someone still needs to add the streams.c file to the MSVC
project/workspace though (there are so many that I don't really know
what I am doing :-).
2002-03-16 02:33:00 +00:00
Marcus Boerger
59ba0b5172 -new streams 2002-03-16 02:23:57 +00:00
Wez Furlong
a184f5d1d3 * formatting, plus remove some old fopen wrappers 2002-03-16 01:34:52 +00:00
Wez Furlong
09213d7bf8 change * formatting 2002-03-16 01:28:57 +00:00
Wez Furlong
0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Wez Furlong
1cc6a8e998 it's late; no more commits from me tonight... 2002-03-15 02:06:08 +00:00
Wez Furlong
0454ad4de8 should have diffed first... 2002-03-15 02:00:55 +00:00
Wez Furlong
ae9db4e440 fix for ZE2 compile 2002-03-15 01:58:00 +00:00
Derick Rethans
7935e73749 - Fix bug #16078 2002-03-14 18:41:35 +00:00
Zeev Suraski
7b3660c6e8 Change case for consistency 2002-03-14 18:39:53 +00:00
Wez Furlong
93ad205756 fix buglet 2002-03-14 14:05:13 +00:00
Zeev Suraski
20f3b718dc Make it clearer what this entry means 2002-03-14 13:35:19 +00:00
Yasuo Ohgaki
dcd86d154e Fixed var_dump() crash when there is recursion.
# Since I said it's easy to fix :)
2002-03-14 09:36:13 +00:00
Sebastian Bergmann
bcdef75be8 Fix credits. 2002-03-13 15:52:24 +00:00
Jason Greene
caa3dbfbb1 Update Credits
#Forgot about sapi
2002-03-13 14:40:31 +00:00
Jason Greene
d53439f246 Update Credits 2002-03-13 14:11:09 +00:00
Wez Furlong
07f5120ee3 I've altered my diagnosis of segfault/leak problem 2002-03-13 02:49:03 +00:00
Wez Furlong
3ef239bfc8 Fix some issues with ZE2, but now have some leaks.
# Any ideas Andrei?
2002-03-13 02:14:28 +00:00
Andi Gutmans
617b26f41d - Compile fixes for Engine 2 2002-03-12 20:28:17 +00:00
Andi Gutmans
c8e7db984c - Allow duality between Engine 1 & 2 using ZEND_STANDARD_CLASS_DEF_PTR 2002-03-12 20:18:01 +00:00
Sebastian Bergmann
6adb33006b Fix TSRMLS_CC. 2002-03-12 07:20:00 +00:00
Yasuo Ohgaki
c43792602e Change php_addslashes() a little.
Since most users do not use magic_quote_sybase, be nicer to
users not using magic_quote_sybase.
2002-03-12 07:05:40 +00:00
Yasuo Ohgaki
e953dba0d7 Make use of TSRMLS_C/D 2002-03-12 06:56:57 +00:00
Marcus Boerger
e39dcad91a -fixed bug 15174
-support for some broken jpegs: bug 13213
-better memory handling
-initial jpeg2000 support (only jpc not jp2,jb2,jpx)
2002-03-12 06:08:48 +00:00
Yasuo Ohgaki
7bccaefc41 Small memory leak fix that does not matter much. 2002-03-11 07:11:54 +00:00
Sebastian Bergmann
6729e0e9bf Fix thread-safe build. 2002-03-11 05:43:23 +00:00
jim winstead
8544cc1532 handle numeric strings. this means we're less picky about the argument
types, but the math functions aren't generally that picky.
2002-03-10 23:46:43 +00:00
Markus Fischer
949e6dbaae - Fix protos. 2002-03-10 23:45:02 +00:00
foobar
fe7a2440ca - Renamed aggregate.lib.php -> aggregate.lib (.php files are always deleted bycvsclean) 2002-03-10 02:38:06 +00:00
Sander Roobol
a4e5289335 Oops... 1 digit is allowed too! Reverting my fix. 2002-03-09 11:23:48 +00:00
Sander Roobol
6e6bd72e0d (php_date) Fixed 'r' modifier to always return two digits for the day
value (see RFC 822) (#15952).
2002-03-08 17:25:43 +00:00
Marcus Boerger
d09d38ad6e TIFF support for 'non' digicam files 2002-03-08 00:57:08 +00:00
Derick Rethans
8d4656dcf6 - Remove CVS things 2002-03-07 15:51:29 +00:00
Sascha Schumann
c12dc3851b touch file 2002-03-07 15:44:10 +00:00
Sascha Schumann
9d9d39a0de Please welcome the new build system.
If you encounter any problems, please make sure to email sas@php.net
directly.

An introduction can be found on

http://schumann.cx/buildv5.txt
2002-03-07 14:20:02 +00:00
James E. Flemer
01505de0b1 (PHP opendir) Changed CHECKUID_ALLOW_ONLY_DIR to CHECKUID_ALLOW_ONLY_FILE
so that relative paths (vs absolute) work correctly.
2002-03-06 18:31:33 +00:00
Dan Kalowsky
86ca867930 quelling a warning, and ensuring now undefined behavior 2002-03-06 16:15:28 +00:00
Derick Rethans
39225a22b8 - Fix tests to work with CLI
#- Not totally done, but this makes it a lot better
2002-03-05 09:00:56 +00:00
Sascha Schumann
e991374db6 Add apparently missing include 2002-03-04 20:14:52 +00:00
Sascha Schumann
b4d5aa5c50 Supply php_html_puts which escapes a whole string.. now fully works in ZTS
mode, too.
2002-03-04 18:46:55 +00:00
Sebastian Bergmann
f79e39cf56 Silence warning. 2002-03-04 18:21:43 +00:00
Sascha Schumann
316a03ca17 revert last commit, puts does more through putc. 2002-03-04 18:12:55 +00:00
Sascha Schumann
42bd356be8 Use PHPWRITE to output data. Because this just outputs diagnostic
information, a few spaces won't hurt (and multiple ones are rendered
as one by browsers anyway).  Micro-benchmarks which use phpinfo()
as a mean to generate output will yield more through-put now
(35 req/s vs. 83 req/s in tux).
2002-03-04 17:48:20 +00:00
Marcus Boerger
d95f691e3f - TIFF support for GetImageSize
@ TIFF support for GetImageSize (Marcus)
2002-03-04 17:17:41 +00:00
Stanislav Malyshev
800e8af417 cygwin fix 2002-03-04 11:11:25 +00:00
Sascha Schumann
cd5f8608e2 Restore use of inline 2002-03-04 08:37:44 +00:00
Rasmus Lerdorf
83e6dbcf19 Let getimagesize() and read_exif_data() share the same constants to
promote a little bit of code reuse here on two very similar problems.
2002-03-04 07:21:30 +00:00
James E. Flemer
787ce372b9 (PHP opendir) Added safe_mode checks on path.
@- Added safe_mode checks for opendir(). (jflemer)
2002-03-03 20:46:57 +00:00
Hartmut Holzgraefe
547b25fd13 php has no 'double', only 'float' 2002-03-02 17:08:09 +00:00
Hartmut Holzgraefe
bff90c71c1 typo fix 2002-03-02 16:41:55 +00:00
Derick Rethans
6f9c7bcf21 - Fix warning message for join(). 2002-03-02 14:06:57 +00:00
Derick Rethans
8b5411b938 - Fix for Sun WorkShop 6 update 2 compiler (Bug #15812) 2002-03-01 16:52:16 +00:00
Zeev Suraski
bb685a402f Fix php_splice() to work with large values 2002-03-01 12:00:05 +00:00
Yasuo Ohgaki
82a8d372e5 Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)

Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.

php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.

Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.

Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.

@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@   buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@   deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@   functions return TRUE for success, FALSE for failure. (Yasuo)
2002-03-01 03:05:50 +00:00
Derick Rethans
27c4648010 - Make it a boolean 2002-02-28 16:00:26 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Derick Rethans
15cadf0c42 - Fix proto 2002-02-27 14:05:39 +00:00
Edin Kadribasic
0bbc3c3a4c Allow use of dl() when CLI is compiled with ZTS (bug #15717). 2002-02-26 11:00:20 +00:00
Derick Rethans
b5a0fd24a1 - Fix the fix.. no need to escape " in single quotes 2002-02-24 14:07:10 +00:00
Derick Rethans
a4946ca375 - Add slashes around string output 2002-02-24 13:26:43 +00:00
Yasuo Ohgaki
15daf99288 Added fmod() function
# Is there any reason that math.c does not use errno?
2002-02-21 11:44:41 +00:00
Andrei Zmievski
513e598d1e Adding object aggregation capability along with tests. 2002-02-21 03:32:42 +00:00
Rasmus Lerdorf
229d207a58 Split CRC32 table out into a header file so other code can use it 2002-02-20 18:18:39 +00:00
Jason Greene
150d339231 Renamed zval_debug_dump() to debug_zval_dump() 2002-02-10 17:38:15 +00:00
Jason Greene
91ac18bc66 @Added zval_debug_dump which works similar to var_dump yet displays extra
internal information such as refcounts, and the true type names (Jason)
2002-02-10 06:52:35 +00:00
Andi Gutmans
284eaf34cc - Add TSRMLS_FETCH()'s needed for the new object overloading in ZE2. 2002-02-05 20:43:49 +00:00
Andrei Zmievski
441c583a2c Converted extract() to use smart_str for variable name manipulation. This
sped it up a bit.
2002-02-01 20:17:32 +00:00
Derick Rethans
98e8a7ba08 - Fix for bug 15311 (type mismatch of php_dl when #ifndef HAVE_LIBDL) 2002-01-31 10:21:24 +00:00
Jon Parise
9aba9071b6 These are now defined in zend_config.w32.h. 2002-01-28 16:06:27 +00:00
Jon Parise
e40e7a669a zend_isinf() is already defined in Zend/zend_config.w32.h for Win32. 2002-01-27 18:19:18 +00:00
Jon Parise
f174bbc711 Use the zend_* versions of finite(), isinf(), and isnan(), as defined
in php_config.h.  Redefine the zend_* versions in the case of Win32.

This fixes the build on systems that don't provide a native version of,
say, isinf() (e.g. Solaris).
2002-01-27 07:41:20 +00:00
Jon Parise
d299bdc5d9 Add a comment indicating that this return statement will never be reached.
# Perhaps it should just be removed?
2002-01-27 07:15:07 +00:00
Sterling Hughes
0d59ff42d4 don't throw fatal errors, throw E_WARNING instead. 2002-01-27 06:18:05 +00:00
Derick Rethans
33b66a224b - Fixed highlight_* (make it more robust)
#- Thx Mr S for noticing this.
2002-01-25 15:43:58 +00:00
Derick Rethans
96a9eba020 - Added optional parameter to highlight_string and highlight_file which
makes these functions return a highlighted string instead of dumping
  to standard output. (Derick)
@- Added optional parameter to highlight_string and highlight_file which
@  makes these functions return a highlighted string instead of dumping
@  to standard output. (Derick)
2002-01-25 11:27:47 +00:00
Rasmus Lerdorf
0d139d3c27 (extraxt) add EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags
@- Added EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS flags to extract()
@   EXTR_IF_EXISTS only extracts a variable if it already exists
@   EXTR_PREFIX_IF_EXISTS only extracts the variable if it exists and
@   then it prepends the prefix to it.  ie. if $PATH exists then
@   extract($_ENV,EXTR_PREFIX_IF_EXISTS,'e') would result in $e_PATH
@  This lets you do $a = $b = $c = true; extract($_REQUEST,EXTR_IF_EXISTS);
@  and you only get the global request variables you have defined imported
@  into your symbol table.  (Rasmus)
2002-01-25 09:01:02 +00:00
Marko Karppinen
449b53e34a Ignore ordinal suffixes on numbers (bug #15210) 2002-01-24 22:24:58 +00:00
Sean Bright
a38bfb424e Fix for bug #15130. Way too much effort for this bug, but cleaned up code
a bit, use zend_parse_parameters(), etc, etc.  We only look for extensions
in the basename, not the full path.
2002-01-22 03:35:23 +00:00
Markus Fischer
fe6e7058ee - Fix crash with invalid localtime on Win32 systems. 2002-01-20 20:16:54 +00:00
Markus Fischer
1e2b854bba - mkdir(): made second (mode) parameter optional, default to 0777
switched to zend_parse_parameters().
# Added vim 'noet' setting
2002-01-11 10:44:24 +00:00
Andrei Zmievski
ddc039d0f5 Fix the recursive counting, it was broken for associative or non-sequential
arrays. Also update NEWS file.
2002-01-10 21:31:06 +00:00
Sascha Schumann
a1dbb4ab16 (PHP touch) Operate on a stack buffer.. no need for allocating newtime
on the heap.
2002-01-10 07:25:00 +00:00
Sascha Schumann
edfd6d0988 Add three-parameter touch() which enables users to set
mtime/atime to different values.
2002-01-10 07:21:57 +00:00
jim winstead
831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
jim winstead
e68095972e Move type-handling functions into ext/standard/type.c (which had
a few otherwise unused functions in it).
2002-01-09 23:47:46 +00:00
Derick Rethans
aee570302f - Fix bug introduced in earlier patch 2002-01-09 16:03:36 +00:00
jim winstead
4fb4c6d4b3 More tweaking of wordwrap() with the cut parameter set. It was being a
little too aggressive and cutting words without breaking at spaces
first. (A couple of tests were incorrect.)
2002-01-05 23:49:58 +00:00
jim winstead
ca15b22212 New memcpy()-based wordwrap() implementation. The simple case
(single-character break, no forced break) appears to be about 60%
faster, and there's simply no comparison for non-simple cases with
non-trivial amounts of text. The old algorithm was O(n^2) (with an
unfortunately large constant factor) because of the use of strncat(),
the new one is O(n). Added some more tests, too.
@ - Made wordwrap() significantly faster. (Jim)
# test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1);
# new code completes in less than a second. i'm still waiting for the
# old code to finish.
2002-01-05 20:46:43 +00:00
jim winstead
62395159a9 Fix the Win32 compile. 2002-01-05 08:29:53 +00:00
Egon Schmid
87ad1fdb3b Fixed some protos. 2002-01-05 07:54:49 +00:00
jim winstead
b9d68b8e9d Apparently multi_convert_to_double_ex() didn't quite do what I
thought. Still need to handle numeric strings.
2002-01-05 03:56:38 +00:00
jim winstead
461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
2002-01-05 03:45:11 +00:00
jim winstead
4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
jim winstead
9a171d03e8 Be more aggressive in making sure that substring matches are valid in
ereg_replace before trying to use them.
# i could have sworn i fixed this in php3. ereg() has similar logic, i
# guess i just missed ereg_replace. fixing this lets
# ext/standard/tests/reg/012.phpt pass on my debian/unstable box
2002-01-05 01:59:11 +00:00
Zak Greant
6823fb1fe7 Surprising how tests can fail when they don't have any supporting data :) Thanks for the catch Jan and Jim 2002-01-05 01:58:44 +00:00
jim winstead
f68b7c5f3e Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768, now fails
and issues a warning because forcing a zero-width cut doesn't make
sense). Also converted to new paramater-passing API and avoid making
an extra copy of the return values.
# also added tests.
@- Fixed segfault in wordwrap() when wrapping to zero width and using
@  multi-character break or trying to force cut (bug #12768). (Jim)
2002-01-04 19:48:08 +00:00
Hartmut Holzgraefe
c9bc54abc3 fix for bug #14832: basename with 2nd parm corrupts source string 2002-01-03 20:20:35 +00:00
Thies C. Arntzen
21cc717bac protos fixes by Wolfgang Drews 2002-01-03 06:57:22 +00:00
Zak Greant
8c8b49ed20 Adding key_exists alias for array_key_exists, at the request of One-Who-Shall-Not-Be-Named-Because-He-Is-On-Vacation 2002-01-02 21:21:48 +00:00
Zak Greant
f01745896f chdir: corrected proto, converted to zend_parse_parameters 2001-12-30 10:13:08 +00:00
Zak Greant
59a45acca6 chroot: corrected prototype, converted to zend_parse_parameters 2001-12-30 09:50:41 +00:00
Zak Greant
2f6ffb545e Converted getenv to use zend_parse_parameters 2001-12-30 09:36:24 +00:00
Derick Rethans
57f3c395b8 - Removed is_array_multidimensional 2001-12-29 22:59:40 +00:00
Derick Rethans
ae07e93028 - Added test for recursive counting 2001-12-29 21:05:03 +00:00
Derick Rethans
cef0a461f9 - Added extra parameter to count() that recursively counts elements in an
array and added is_array_multidimensional(). (patch by Vlad Bosinceanu
  <glipy@fx.ro>)
2001-12-29 20:59:59 +00:00
Andi Gutmans
211d712c59 @ Fix bug in krsort() where an extra character was being compared (Andi)
- Fix bug in krsort() where an extra character was being compared (Andi)
2001-12-29 20:47:25 +00:00
Sebastian Bergmann
9063a96dfa PHP 4.0 -> PHP 4. Patch by Martin Jansen <mail@martin-jansen.de>. 2001-12-29 14:23:58 +00:00
Dan Kalowsky
b76eb3ae40 Making PHP compile again on MacOSX 10.1
# 10.1 does not have inet_pton support yet it seems so disabling it.
2001-12-27 15:42:05 +00:00
Markus Fischer
7cf14fb1e1 - Fix tiny leak. 2001-12-23 15:56:41 +00:00
Alex Waugh
e320de1e2e Undefine AF_UNIX under RISC OS 2001-12-23 00:46:13 +00:00
Derick Rethans
e8f3e3ffa0 - Let ceil also return a float in every case 2001-12-22 11:53:29 +00:00
Derick Rethans
6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Zak Greant
2c9f5d8a91 Modified array_walk, arsort, asort, krsort, ksort, rsort, shuffle, sort,
uasort, uksort and usort.

Corrected prototype comments for all.

Converted to use zend_parse_parameters, except for the u.?sort functions.

Changed return values for failure from implicit NULL to explicit FALSE in
asort(), krsort(), and ksort().

Changed pval to zval in the u.?sort functions.

Added test to help ensure that fixes to code do not change function
behavior. Tests are quite large (~237k) but compress down to ~16k.
Please let me know if this is a problem!
2001-12-22 11:49:56 +00:00