Commit Graph

1895 Commits

Author SHA1 Message Date
foobar
f73ee14bd9 Check that realpath is available. Bug: #9469
# TSRM still uses it without checking. I can't fix that.
2001-10-23 11:14:51 +00:00
Zeev Suraski
c767809b2f Prolong the death of dl() for a little while longer. 2001-10-23 01:18:54 +00:00
Rasmus Lerdorf
d98c96fc6c Use references instead of making a copy each time in array_init(). About
twice as fast for a high number of elements.  2.80 seconds for the copy
of 1,000,000 elements and 1.39s for the reference version.  Need to chunk
it every 62k or so because refcount is a short.
2001-10-22 20:49:27 +00:00
Jeroen van Wolffelaar
43b3da1396 Make math tests pass, round & co don't work this way, and there was an error
in expected output
2001-10-22 09:44:27 +00:00
foobar
701b1a548e Fixed bug: #12617 2001-10-22 02:35:10 +00:00
Rasmus Lerdorf
4d60dbb9ef Oops, leftover crud 2001-10-21 07:45:32 +00:00
Rasmus Lerdorf
798ec79319 Motivated by bug #13607 I wrote up a simple array_init() function that
lets you quickly create an array and initialize each element to a certain
value.
@ Add array_init() function (Rasmus)
2001-10-21 07:42:35 +00:00
foobar
5db38caece Fixed bugs: #13251, #9827, #11363 2001-10-21 03:01:17 +00:00
Andrei Zmievski
5c90e7a78f Fix warning, 2001-10-20 13:45:29 +00:00
Derick Rethans
6852a1e704 - Fix for bug #13413 2001-10-20 10:58:33 +00:00
Andrei Zmievski
030e873758 convert to use new parameter parsing API. 2001-10-19 19:48:35 +00:00
Andrei Zmievski
1ed249ddbc Converting to use new parameter parsing API. 2001-10-19 19:21:58 +00:00
Egon Schmid
1f852425d1 Fixed other protos. 2001-10-19 19:21:28 +00:00
Egon Schmid
28575499df Fixed another proto. 2001-10-19 18:42:25 +00:00
Andrei Zmievski
65da5375ea Conver to use new parameter parsing API. 2001-10-19 18:26:30 +00:00
Edin Kadribasic
c0efc001af Fixed last argument in strlcat() call. 2001-10-19 18:06:37 +00:00
Andrei Zmievski
8a54c2929f Convert to use new parameter parsing API. 2001-10-19 17:16:12 +00:00
Edin Kadribasic
86959aaf62 Changed strncpy=>strlcpy; strncat=>strlcat 2001-10-19 15:54:05 +00:00
foobar
d9c26ab299 fixed proto 2001-10-16 17:08:11 +00:00
Edin Kadribasic
96a04d4ab7 Fixed bug #13083 in http_fopen_wrapper.c which is now able to handle
non absolute redirects.
2001-10-15 23:30:40 +00:00
Sascha Schumann
a92fa9b2bc Either sizeof(struct stat) or sizeof f_stat, but not sizeof stat. 2001-10-13 23:43:49 +00:00
Stig Bakken
689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Stig Bakken
925ff7f2b2 * remove version_{lt,le,gt,ge,eq} functions, added a third optional
parameter to version_compare doing the same thing
2001-10-11 10:35:59 +00:00
Stig Bakken
f0c30a0662 * added function entries for version_{lt,le,gt,ge,eq} 2001-10-10 10:32:16 +00:00
Stig Bakken
f3d2d4c630 @Added version_{lt,le,gt,ge,eq} functions (Stig) 2001-10-10 10:14:51 +00:00
Derick Rethans
62fb3d63c5 @- Added mmapfile(), read a file into a variabele with mmap (Ilia A, Derick)
- Added mmapfile(), read a file into a variabele with mmap (Patch by:
  Ilia A. <ilia@prohost.org>)
2001-10-07 18:34:44 +00:00
Jeroen van Wolffelaar
78b881f389 Fix naming inside php_search_array, comp_func is not a compare function. 2001-10-07 13:49:08 +00:00
Sterling Hughes
3a50a0322f @ Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
@ not been called. (Sterling)
2001-10-07 11:52:09 +00:00
Stig Bakken
89bd184ea0 @Added version_compare() function (Stig) 2001-10-06 23:22:37 +00:00
Derick Rethans
a0bbfb590c - <br> -> <br /> 2001-10-06 20:13:39 +00:00
Sterling Hughes
af1c7070f7 fix execution order 2001-10-06 18:59:39 +00:00
Sterling Hughes
16da751e3b avoid TSRMLS_FETCH() 2001-10-06 18:55:09 +00:00
Sterling Hughes
1bceefb2da @ Don't through a file does not exist warning for the is_dir(), is_writeable(),
@ is_readable(), is_executable(), is_link() and is_file() functions. (Sterling)
2001-10-06 18:52:37 +00:00
Edin Kadribasic
26389258bb Made assert test pass on systems with short open tags disabled.
Added .cvsignore
2001-10-06 09:38:29 +00:00
Stig Bakken
9ce638248d * prototype of version_compare, doesn't work yet 2001-10-05 23:56:19 +00:00
Jeroen van Wolffelaar
a1c2b86701 Fix the pow-test, it now succeeds on my machine 2001-10-05 23:37:08 +00:00
Jeroen van Wolffelaar
5541451085 Add test for array_search and in_array
(should be expanded though)
2001-10-05 22:01:04 +00:00
Jeroen van Wolffelaar
62feefddc7 Fix array_search and in_array. Now binary safe, and faster (returns when
found, and doesn't duplicate the key each time, but only when necessary)

Patch also by Edin Kadribasic
2001-10-05 21:58:41 +00:00
Jeroen van Wolffelaar
89ea50a588 Fix bug 13567 and don't depend on a boolean int-value to be either 1 or 0 2001-10-05 20:14:33 +00:00
Edin Kadribasic
e78b61542d Added array_change_key_case() function that returns array with
with all string keys lowercased or uppercased
@- Added array_change_key_case() function that returns array with
@  with all string keys lowercased or uppercased (EdinK)
2001-10-05 18:38:53 +00:00
Derick Rethans
744d1fc1ea - 'Fix' for bug #13543 2001-10-04 15:25:39 +00:00
Derick Rethans
be52d66f4b - Fix crashbug in php_chunk_split() 2001-09-27 06:55:23 +00:00
Zeev Suraski
7e42c73a50 Another leak bites the dust? 2001-09-27 00:21:21 +00:00
Derick Rethans
51e2a6b84e - nl2br now handles different styles of line endings in one string. (Patch
by Boian Bonev <boian@bonev.com>)
@- nl2br now handles all styles of line-endings in one string. (Boian,
@  Derick)
2001-09-26 19:34:46 +00:00
Jeroen van Wolffelaar
0916fd50c0 5th and probably/hopefully last run of conv_z_macros 2001-09-26 09:21:58 +00:00
Jeroen van Wolffelaar
6cfba2a3ea 2nd phase in back-substitution those macro's
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Derick Rethans
f1ce7daccd - Fix crash bug (patch by <chocolateboy@lunomail.com>) 2001-09-24 08:33:51 +00:00
Jeroen van Wolffelaar
f61dfce39c Make chop the alias and rtrim the main function, in order to get automagically
generated alias-listings correct.
2001-09-23 18:32:46 +00:00
Jeroen van Wolffelaar
929ae94c64 Let settype also accept 'int', 'bool', 'float' and 'null'
@Let settype also accept 'int', 'bool', 'float' and 'null' (Jeroen)
2001-09-22 01:39:14 +00:00
Hartmut Holzgraefe
03f7406711 proto fixes "double" -> "float" 2001-09-21 21:59:27 +00:00
Hartmut Holzgraefe
2c275bf793 renamed doubleval to floatval and made doubleval an alias to floatval
made is_float the function entry and is_double the alias
2001-09-21 21:29:14 +00:00
Sascha Schumann
4582d38519 Fix warning on Win32 (thanks to Sebastian) 2001-09-21 17:21:50 +00:00
Sascha Schumann
0a8677167d don't use boyer_str_to_str. It is experimental 2001-09-21 16:17:14 +00:00
Sascha Schumann
9002e37e4e Always seed the LCG from the request-init hook, otherwise the seed
would be shared among the threads which is quite pointless.  Also
use a function of the current time as one factor.

Use gettimeofday() instead of time(), because it is faster on some
operating systems.
2001-09-21 13:38:44 +00:00
Sascha Schumann
f45555e62f Rework some string-to-number and vice-versa functions to work smarter
(e.g. without using functions that use slow locales, without allocating
 extra memory and with fewer integer/float operations)
2001-09-20 08:22:44 +00:00
Stig Venaas
926d1506e0 Added IPv6 support to gethostbyaddr()
@- Added IPv6 support to gethostbyaddr()
@  (Patch by Matthias Wimmer <matthias@charente.de> and venaas)
2001-09-19 18:08:15 +00:00
Sascha Schumann
e261d310a0 quickly fix newly introdued off-by-one 2001-09-19 11:03:58 +00:00
Sascha Schumann
e4ace6cde6 Rewrite _php_match_basetozval to need only one multiplication
per iteration and avoid the U?LONG_MAX hassle.
2001-09-19 10:57:50 +00:00
Sterling Hughes
563c0670e5 another attempt at fixing compile warnings... 2001-09-18 20:05:05 +00:00
Sterling Hughes
8092460830 hopefully fix win32 compile warnings
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
Sterling Hughes
bcb426a207 Merge in qsort changes 2001-09-17 21:02:53 +00:00
Sterling Hughes
97fea0931c Make rand thread safe when ZTS is defined. 2001-09-16 20:49:57 +00:00
Sterling Hughes
96763e8372 Hopefully fix compile warnings on win32 systems 2001-09-16 17:37:19 +00:00
Sterling Hughes
47f3851a00 for the daft folks that think 0 is a good seed. 2001-09-16 03:50:04 +00:00
Sterling Hughes
373fc12bb1 @ Make the seed options to srand() and mt_srand() optional, if the seed is
@ not specified, the generate the most random seed possible. (Sterling)

Please, if anyone has any comments on the way I generate this seed, speak up!
This seems to be the most "random" seed I could come up with...

This commit is 100% backwards compatible :)

Add myself to the authors list cause of recent work on the file
2001-09-16 03:46:59 +00:00
Rui Hirokawa
9c5580c7d4 Added support for japanese encoding to htmlentites() and htmlspecialchars(). @ Added support for japanese encoding to htmlentites() and htmlspecialchars(). (Rui) 2001-09-15 04:48:48 +00:00
Thies C. Arntzen
e929389eeb fix strtr() when called with two parameters. this has been broken for some time!
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
foobar
5275b60398 Enable chroot() only if SAPI is CGI. 2001-09-12 02:07:46 +00:00
Sascha Schumann
4c69a970d3 Remove some unused variables 2001-09-11 07:52:55 +00:00
Sascha Schumann
2bbbec107b A round of "d'ohs" for me, please.
We must not stop scanning after finding a "?", because we
need the information regarding the "#".
2001-09-10 11:22:43 +00:00
Zeev Suraski
517bd3018c Do some justice to the doc team 2001-09-09 23:37:55 +00:00
Sascha Schumann
de963ce9c6 Better fix for mark problem 2001-09-09 14:52:39 +00:00
Sascha Schumann
c86c9f52b4 Fix mark-handling 2001-09-09 14:38:12 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Derick Rethans
61d4f7fe65 - Really fix nl2br now... it's actaulyl faster now 2001-09-09 12:55:48 +00:00
Derick Rethans
176cd90bd7 - Fix for bug 11904
#- This is possibly not the best solution... feel free to improve
2001-09-09 11:42:36 +00:00
Sterling Hughes
ff2bc83c08 remove ARG_COUNT(ht)
# Is there any reason that the set_compare_func call is passed SORT_STRING
# instead of SORT_REGULAR??
2001-09-09 11:03:31 +00:00
Sterling Hughes
6963ac4050 export the mt rand functions... 2001-09-09 10:44:12 +00:00
Sterling Hughes
25d4500a86 I should really learn how to spell 2001-09-06 08:56:24 +00:00
Sterling Hughes
b7ba9e007d avoid lowercasing the string 2001-09-06 08:54:54 +00:00
Sterling Hughes
33fc6e2d5f add missing ) 2001-09-06 07:33:45 +00:00
Sterling Hughes
8a156d9a39 fix ms compile warnings 2001-09-06 06:41:16 +00:00
Sterling Hughes
903c831be5 spaces -> tabs work cont. 2001-09-06 00:40:02 +00:00
Sterling Hughes
a4c905ff16 ws fix 2001-09-06 00:18:13 +00:00
Sterling Hughes
a1b11f0755 Fix ts build
# I've gotta start compiling --enable-experimental-zts...  anyway we can make
# this the default when compiling from cvs?  It'll help a large portion of
# compile issues with patches
2001-09-05 21:46:44 +00:00
Sterling Hughes
e121eaaef5 Straight out da bronx, I be using zend_parse_parameters()
# Word out to my peeps on Connor st.
2001-09-05 21:38:49 +00:00
Sterling Hughes
5ec58914fe stray tabs and spaces 2001-09-05 21:04:30 +00:00
Sterling Hughes
f0c5631778 change range macro semantics
# Kinda torn between the two, thoughts?
2001-09-05 20:59:24 +00:00
Sterling Hughes
d930a72cd7 remove inline 2001-09-05 20:56:15 +00:00
Sterling Hughes
1b0f00d67f a bit of api cleanup... move range stuff into a macro (properly :) 2001-09-05 20:52:45 +00:00
foobar
42b5521af5 revert bad commit. 2001-09-05 19:47:55 +00:00
Sterling Hughes
b9edf7c17c API Update 2001-09-05 06:55:37 +00:00
Egon Schmid
03fbbb098c Fixed some protos. 2001-09-04 10:44:28 +00:00
Sterling Hughes
38cacba117 Thanks sebastian
# I really like this whole qa team thingy
2001-09-04 10:13:55 +00:00
Sterling Hughes
536c96969b update php_trim as well... 2001-09-04 09:35:53 +00:00
Sterling Hughes
c661449ebf fix crash bug 2001-09-04 09:33:30 +00:00
Sterling Hughes
0935217091 fix proto 2001-09-04 06:21:48 +00:00
Sterling Hughes
e55315a375 tabs -> spaces 2001-09-04 06:20:23 +00:00
Sterling Hughes
fe03f6f4c2 Begin cleanup, api wise... 2001-09-04 06:18:11 +00:00
Sterling Hughes
3151916113 pval -> zval 2001-09-04 06:08:42 +00:00
Daniel Beulshausen
9b8886410d fix zts+win32 build 2001-09-04 02:19:30 +00:00
Sterling Hughes
dda004bcfb - update to php4 api
- expand case statements, ie:

case 1: case 2: case 3:

to

case 1:
case 2:
case 3:

- Remove un-necessary brackets and parentheses (only when it takes away from
readability, I know this is quite arbitrary, but I did my best :)
2001-09-03 23:30:33 +00:00
Andi Gutmans
1ecd31b66c - Fix thread safe mode.
- Please don't use Java style function braces.
2001-09-03 20:21:00 +00:00
Derick Rethans
383691eec2 - Fix broken build
#- Please test before commit!
2001-09-03 17:38:10 +00:00
Stanislav Malyshev
0a143cf655 Add _php_math_zvaltobase and _php_math_basetozval
This allows to use bindec, etc. functions to convert numbers longer
than fits in long, using floats instead.
Note: the functions like decbin still don't use the zval-ed functions,
so they work only on longs yet.
2001-09-03 16:26:31 +00:00
Jeroen van Wolffelaar
dc8386e30d Removed outdated comment until I've got a better one 2001-09-03 12:01:50 +00:00
Jeroen van Wolffelaar
efb83df9f9 Kill some warnings/errors (reported by Sebastian, more to come, but
could take some time. Update of ZTS-builderrors is welcome)
2001-09-03 11:57:15 +00:00
Sterling Hughes
79c27f0cd2 should be this 2001-09-03 08:47:45 +00:00
Sterling Hughes
b417b96fb8 - Update to the PHP4 API (newer macros)
- Improve error reporting from split()
- Some minor speed improvements
2001-09-03 08:44:02 +00:00
Sterling Hughes
f6d73d73fb stray tabs 2001-09-03 06:10:45 +00:00
Sterling Hughes
f14ada19ac cleanup sscanf() just a tiny bit, just so it looks like the rest of the code
in the string.c file.
2001-09-03 04:49:36 +00:00
Jeroen van Wolffelaar
0cb6a31906 Fix array_rand and array_suffle to use php_rand correctly 2001-09-03 01:54:04 +00:00
Jeroen van Wolffelaar
b0300e26df Fix prototype 2001-09-03 01:46:03 +00:00
Jeroen van Wolffelaar
72c7ae080b Fix SIGSEGV because HAS_SRAND didn't check wether the entry existed at
all
2001-09-03 01:25:24 +00:00
Jeroen van Wolffelaar
1a68fe49cb Add forgotten files to MAIN 2001-09-03 01:10:29 +00:00
Jeroen van Wolffelaar
92f1248a49 Update credits 2001-09-03 01:09:35 +00:00
Jeroen van Wolffelaar
f7306ce010 Merge RAND_REDESIGN into MAIN 2001-09-03 01:06:23 +00:00
Andrei Zmievski
392e1edee8 @- Made in_array() and search_array() allow the needle to be an array in
@  itself. (Andrei)
2001-08-31 04:52:10 +00:00
foobar
d340c5b2bf @- Added ini_get_all() function which returns all registered ini entries
or the entries for the specified extension. (Jani)
2001-08-30 17:47:04 +00:00
foobar
5dd2b6e2fd According to Zeev this code is just for showing how to create overloaded classes. 2001-08-29 23:53:22 +00:00
foobar
08a521572f WS fixes and indenting. 2001-08-29 16:00:30 +00:00
Rasmus Lerdorf
563ffb8984 Kill a warning 2001-08-28 21:50:37 +00:00
Zeev Suraski
b781720b36 More fixes and refinements 2001-08-27 00:23:55 +00:00
Zeev Suraski
d697a558ac Fix my session updates.
trans_sid handling will no longer slow down performance unless a session
is actually in use.
2001-08-26 11:49:43 +00:00
Zeev Suraski
7b73aee40f Make the session module more independent 2001-08-26 01:09:20 +00:00
Zeev Suraski
b8763a6f8c Get rid of TRANS_SID - it's always possible to use it now. 2001-08-25 16:09:23 +00:00
Zeev Suraski
13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Wez Furlong
9e7da02d3b Fix htmlspecialchars problem. 2001-08-24 08:58:10 +00:00
Andrei Zmievski
cae9763d0a @- Fixed a crash bug in array_map() if the input arrays had string or
@  non-sequential keys. Also modified it so that if a single array is passed,
@  its keys are preserved in the resulting array. (Andrei)
2001-08-24 02:58:23 +00:00
John Donagher
faa5031f25 Don't try and search a 0-length string. This allows parse_url() to correctly
parse a non-pathed URI, i.e. 'scheme://'
2001-08-24 02:21:16 +00:00
Wez Furlong
f20e9fa298 - Add support for chinese encodings to htmlentities/htmlspecialchars
(patch from Alan Knowles <alan_k@hklc.com>)
2001-08-23 10:43:15 +00:00
Jeroen van Wolffelaar
3e62bd0867 Reverted the patch to main branch - should have branched whole
ext/standard...
2001-08-22 22:14:08 +00:00
Jeroen van Wolffelaar
43c2bc364f Commit forgotten fix in crypt.c, oversight of a BC-problem 2001-08-22 22:11:57 +00:00
Gavin Sherry
bd4150ed80 Fixed buffer overflow issue. 2001-08-22 05:47:11 +00:00
Gavin Sherry
ff7a694e0f Changed php_strip_tags() to check if <? was XML code. 2001-08-22 02:03:14 +00:00
Joey Smith
1c10503029 Hmmm...not sure what this was trying to do. stat() was acting like filesize(). 2001-08-21 23:58:19 +00:00
Zeev Suraski
e140b35b04 API update 2001-08-21 12:57:53 +00:00
Sascha Schumann
01672af8f0 Improved fix 2001-08-20 15:27:45 +00:00
Stanislav Malyshev
902100a692 Fix long printing in smart_str_print_long 2001-08-20 15:26:10 +00:00
Stanislav Malyshev
8fd65b9f16 test big numbers too 2001-08-20 14:15:05 +00:00
foobar
d3aff0f6ee make this test work. 2001-08-18 16:47:02 +00:00
Sterling Hughes
807b49aa2f K&R format changes 2001-08-18 08:43:47 +00:00
Sterling Hughes
03724a70e9 Z_*_P{0,2} macro work. 2001-08-17 09:10:49 +00:00
Sterling Hughes
c53f80fb23 1) update to the ZEND_NUM_ARGS() and Z_*_P{0,2} macros
2) minor ws improvements, removing unecessary error checking logic, and
making the error messages a bit nicer looking
2001-08-17 09:08:03 +00:00
Sterling Hughes
06aa7a4d19 Cleanup of var_dump() with correct macro's, k&r indent, and removal of a
pair of unnecessary { }
2001-08-17 07:50:15 +00:00
Sterling Hughes
844788a4b8 pval -> zval
Z_*_P{0,2} macros
easier way of doing urldecode(), from rawurldecode() (a tad faster too).
2001-08-17 07:41:20 +00:00
Sterling Hughes
591aba3c89 ws fix. 2001-08-17 07:07:34 +00:00
Sterling Hughes
6bc04c0858 Clean up the function for the Zend API (php3, early php4 relics removed).
Use PF_INET, instead of AF_INET, if present.
remove some code enclosed in #if 0 ... #endif that made no sense
2001-08-17 06:53:26 +00:00
Zeev Suraski
2d8ca548e2 Fix build 2001-08-15 22:49:15 +00:00