Commit Graph

654 Commits

Author SHA1 Message Date
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
Wez Furlong
0895998bef s/get_file_contents/file_get_contents/ 2002-03-16 16:52:24 +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
d4e63bc5bf - Raise warning when trying to execute non-executeable shell
for mail delivery binary.
2002-03-16 12:45:43 +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
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
Derick Rethans
15cadf0c42 - Fix proto 2002-02-27 14:05:39 +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
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
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
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
Egon Schmid
87ad1fdb3b Fixed some protos. 2002-01-05 07:54:49 +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
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
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
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
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
3cb1db985e - Added var_export, which shows a representation of a variable, much like
var_dump, but in such a way you can use it as PHP code.
@- Added var_export, which shows a representation of a variable, much like
@  var_dump, but in such a way you can use it as PHP code. (Derick)
2001-12-08 23:44:34 +00:00
Sterling Hughes
d95a4e2c19 Fix long2ip's handling of unsigned longs, by accepting a string argument and
then manually converting the string to an unsigned long using strtoul()
2001-12-07 13:20:18 +00:00
Egon Schmid
9f456af68b Fixed some protos. 2001-12-07 09:34:50 +00:00
Hartmut Holzgraefe
49cc65cdae renamed rot13 to str_rot13() 2001-12-06 21:39:01 +00:00
Hartmut Holzgraefe
71028d46cf ported rot13() from php3 2001-12-06 19:02:27 +00:00
Derick Rethans
1f14640b3e - Added ob_get_level, which returns the nesting level of the output buffering
mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@  mechanism. (Yasuo, Derick)
2001-12-03 07:43:53 +00:00
Derick Rethans
9190271cef - Added ob_flush and ob_clean functions, which do not end the buffer like
ob_end_flush and ob_end_clean do.
@- Added ob_flush and ob_clean functions, which flush and clean an
@  output buffer without destroying the buffer. (Derick)
2001-11-30 10:48:38 +00:00
Derick Rethans
f17f3371be - Added md5_file(), which calculaties the MD5 sum of a file.
(patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
@- Added md5_file(), which calculaties the MD5 sum of a file.
@  (patch by: Alessandro Astarita <aleast@capri.it>) (Derick)
2001-11-18 18:48:17 +00:00
Stanislav Malyshev
39f3075500 Check in ftok() function by Andrew Sitnikov <sitnikov@infonet.ee> 2001-11-15 09:53:40 +00:00
foobar
12cfb76b65 Fixed the wrong logic in ini_get_all() function.
Now it behaves same as how phpinfo() outputs the ini entries.

If there is a local value, then the global one is the 'original one' if
there is such. Otherwise global value is same as local. :)
2001-11-13 00:37:49 +00:00
Derick Rethans
78e4644fa1 - Renaming key_exists to array_key_exists
@- Renamed key_exists tp array_key_exists. (Derick)
#- Not sure if this belongs in NEWS, but it was already in a released
#  version. And yes, I know I'm breaking BC here, but as it was not documented
#  yet, that doesn't matter.
2001-11-11 18:28:43 +00:00
Stanislav Malyshev
88c66d4859 Fix crash bug on malformed .ini file 2001-11-11 12:41:14 +00:00
Derick Rethans
88c6758d4e - Fixing this bad idea 2001-11-10 18:06:28 +00:00
James Moore
4f78737000 Fix apache win32 dso build.
(This is untested on linux but shouldnt break anything)
2001-11-10 17:24:02 +00:00
Zeev Suraski
2f08cb119c more ws 2001-10-29 09:45:47 +00:00
Zeev Suraski
c06c27af73 Whitespace fixes
Don't Adafy the code, Jani :)
2001-10-28 22:51:58 +00:00
Andrei Zmievski
2890b57e46 @- Added array_chunk() function that splits an array into chunks of specified
@  size. (Andrei)
2001-10-27 05:11:15 +00:00
Rasmus Lerdorf
72fc6bc4b1 As suggested on php-dev, array_fill() is probably a better name for this
function.
2001-10-23 18:46:35 +00:00
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
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
d9c26ab299 fixed proto 2001-10-16 17:08:11 +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
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
Stig Bakken
9ce638248d * prototype of version_compare, doesn't work yet 2001-10-05 23:56:19 +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
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
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
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
foobar
5275b60398 Enable chroot() only if SAPI is CGI. 2001-09-12 02:07:46 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
foobar
42b5521af5 revert bad commit. 2001-09-05 19:47:55 +00:00
Jeroen van Wolffelaar
f7306ce010 Merge RAND_REDESIGN into MAIN 2001-09-03 01:06:23 +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
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
Zeev Suraski
2d8ca548e2 Fix build 2001-08-15 22:49:15 +00:00
Rasmus Lerdorf
4d11d90880 Track down a few more functions that don't check for 0 args and use
faster mechanism
2001-08-13 07:55:39 +00:00
Rasmus Lerdorf
8c497f05c4 We don't consistently check for args passed to functions that don't
take any args.  In some cases we probably want to skip the check for
performance reasons, but in other cases where performance is unlikely
to be a factor, not throwing a warning on the wrong number of args passed
to a function is at best inconsistent, and at worst it could hide a bug.
So, add a few such checks.  There are still lots of cases out there.
2001-08-13 06:43:47 +00:00
Zeev Suraski
49e45baf9b - Fix API
- Update NEWS
2001-08-13 00:32:04 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Zeev Suraski
f47962c7c0 Implement import_request_variables() 2001-08-08 20:05:37 +00:00
Andrei Zmievski
c4555f9f55 @- Added vprintf() and vsprintf() functions that allow passing all arguments
@  after format as an array. (Andrei)
2001-08-07 19:44:45 +00:00
Thies C. Arntzen
a35df189b8 we can no longer register internal-classes once the script is started.
therefore the "incomplete class" is now registered at MINIT time.
2001-08-06 13:36:08 +00:00
Sascha Schumann
b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Thies C. Arntzen
3884b15b95 fix possible crash - we should never keep the zval** as they might point
somewhere into the Engine. (there's still a new bug in strtok - hunting;-)
2001-08-04 16:53:57 +00:00
Sascha Schumann
f6ed403fde Don't copy the strtok parameter 2001-08-03 09:50:38 +00:00
Sascha Schumann
7471943c06 Replace our strtok implementation with a binary-safe one which code
does not cause headaches when reading it.  Also happens to be a bit quicker.
2001-08-03 08:49:19 +00:00
Frank M. Kromann
2794a0e69a These new math functions are not supported on Win32 2001-08-01 16:55:24 +00:00
Andrei Zmievski
fa6b5cdde7 - Added a few new math functions from Jesus Castagnetto.
- Converted to Z_* macros.
@- Added a few new math functions. (Jesus)
2001-08-01 13:48:14 +00:00
Zeev Suraski
b1de7fc900 More TSRMLS_FETCH annihilation. Enough for today... 2001-07-31 07:09:49 +00:00
Zeev Suraski
bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Zeev Suraski
797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
Zeev Suraski
b0224d51da Zend compatibility patch 2001-07-30 05:36:18 +00:00
Zeev Suraski
7b1c400631 More TSRMLS_FETCH annihilation (Zend compatibility patch) 2001-07-30 04:58:07 +00:00
Zeev Suraski
1c25b8dd53 Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way 2001-07-30 01:56:43 +00:00
Andi Gutmans
442890f3e1 - And more... 2001-07-29 08:20:30 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Thies C. Arntzen
b660a9f553 fix newly introduced mem-leak in assert-module 2001-07-23 16:13:34 +00:00
Zeev Suraski
336004f4bc Improved bailout mechanism, supports nested bailouts a-la try..catch
Note:  You may *not* return directly from a catch block
2001-07-21 14:27:56 +00:00
Rasmus Lerdorf
934e10c7dc Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
a gid check instead of a uid check.
@ - Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
@ a gid check instead of a uid check. (James E. Flemer, Rasmus)
2001-07-09 17:36:04 +00:00
Thies C. Arntzen
61822fcd47 @ - assert() now accepts the array(&$obj,"methodname") syntax. (Thies)
+ some cleanups
2001-07-09 10:20:41 +00:00
Sascha Schumann
28efce4019 Reset strtok_string, so that strtok can be used in all session handler
functions.
2001-07-08 23:28:48 +00:00
Wez Furlong
f1364ebf3e (PHP nl_langinfo) Added function when provided by OS
(PHP htmlentities, htmlspecialchars) Uses nl_langinfo to determine charset
@- Added nl_langinfo() (when OS provides it) that returns locale
   information. (Wez Furlong)
# There are a lot of constants used by nl_langinfo; should we do something
# along the lines of what we do for syslog?
2001-07-04 10:10:30 +00:00
Derick Rethans
91424b2b91 - Fixed proto's (Patch by Zak) 2001-07-02 11:11:58 +00:00
Andi Gutmans
c977f29862 - Use ALLOC_HASHTABLE() instead of emalloc(sizeof(HashTable)) 2001-06-19 16:03:35 +00:00
Zeev Suraski
1093ed17fb Clean-up
Remove a lot of 100% redundent code
2001-06-13 17:04:36 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Sterling Hughes
b2bd3b315f move to php_strtok_r() 2001-05-27 01:18:12 +00:00
Andi Gutmans
4ddb24366f - Fix problem of output initialization 2001-05-23 16:52:45 +00:00
Sterling Hughes
17e5edbf18 @ Added the CONNECTION_ABORTED, CONNECTION_TIMEOUT and CONNECTION_NORMAL
@ constants. (Zak)
2001-05-23 03:37:53 +00:00
Andi Gutmans
177934732b - Start nuking not needed GINIT 2001-05-22 19:19:04 +00:00
Andrei Zmievski
4d78270b4e Moving some functions into Zend. 2001-05-21 15:47:52 +00:00
Andi Gutmans
d160031c7d - EG's are passed automatically to internal functions. 2001-05-21 15:27:11 +00:00
Sean Bright
0b716d18b1 Added get_defined_constants() function. Returns an associative array of
constants mapped to their values.
@- Added get_defined_constants() function to return an associative array of
@  constants mapped to their values. (Sean)
# If anyone sees a problem let me know.
2001-05-21 13:36:42 +00:00
Derick Rethans
dc43b9f574 - Reversed 'fix' for #9698
- Fix for bug #9698/#10681 (patch by kettler@gmx.net)
@- Added the 'u' modifier to printf/sprintf which prints unsigned longs.
@  (Derick)
2001-05-20 00:23:49 +00:00
foobar
16b94858b6 Fixed bug #10964 2001-05-19 22:21:40 +00:00
Sascha Schumann
d5cfb03ac9 munmap() file in RSHUTDOWN, if PHPWRITE fails. 2001-05-18 23:38:46 +00:00
Jon Parise
82b31fb7a3 @ - Added disk_total_space() to return the total size of a filesystem.
@   (Patch from Steven Bower)
2001-05-15 23:43:18 +00:00
Jon Parise
6c5db8d2d7 @ - Renamed diskfreespace() to disk_free_space() to conform to established
@   naming conventions. (jon)
2001-05-15 23:28:17 +00:00
Andrei Zmievski
1f9808b4ee Clean up call_user_func_*(). 2001-05-14 20:56:05 +00:00
Sterling Hughes
803bebb303 Use zend_is_callable to test whether or not the given callback is valid
before calling the function.
2001-05-14 20:06:06 +00:00
Sterling Hughes
47ee387d79 Use zend_is_callable() and fix sp of deprecated. 2001-05-14 19:19:03 +00:00
Sterling Hughes
c58fdadc1f Couple of changes (and a little whitespace correction, sorry to mix :(
1) Depreciate the call_user_method*() variety of functions, their
    functionality can be easily duplicated by using the call_user_func*()
    functions (using the array(&$obj, "method") syntax).

    2) Change some pval's to zval's.

    3) Improve the error handling mechanism of call_user_func*() to report
    an the class name and the function name if an object or class name is
    given.
2001-05-14 19:02:23 +00:00
Andrei Zmievski
8a86d17882 Need to use ELS_FETCH() here. 2001-05-14 14:16:44 +00:00
Andrei Zmievski
553e04be2f @- Fixed a bug in call_user_*() functions that would not allow calling
functions/methods that accepted parameters by reference. (Andrei)

* Allow separation of arguments in call_user_* functions - this allows calling
  functions that force parameters by reference.
* Use executor function table instead of compiler one.
2001-05-14 13:24:03 +00:00
Andrei Zmievski
8112d1beba @- Added is_callable() function that can be used to find out whether
@  its argument is a valid callable construct. (Andrei)
2001-05-09 20:06:39 +00:00
James Moore
f3342a5b55 Fix win32 build 2001-05-06 19:20:25 +00:00
foobar
6c21f7ef0f Moved ts_alloca_id() into MINIT like Andi requested. 2001-05-06 17:55:10 +00:00
foobar
8e006f81af Fix bug: #8834. Now there should be more random salts.. 2001-05-06 16:54:27 +00:00
Andi Gutmans
4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
David Croft
34f03f2c5c @ - Added key_exists() to check if a given key or index exists in an
@ array or object (David Croft)
Added key_exists() to check if a given key or index exists in an array or object
2001-04-30 04:06:09 +00:00
Wez Furlong
86c84da7c2 Discovered warn_not_available and used it. 2001-04-17 17:08:03 +00:00
Wez Furlong
57af70f707 Changes for streams. Added temporary fopenstream function to PHP so that
the streams can be tested.
2001-04-17 17:06:06 +00:00
André Langhorst
9762f64222 fix proto 2001-04-07 15:43:06 +00:00
Sascha Schumann
fa068b5297 Fix ZTS build 2001-03-24 01:08:13 +00:00
Romolo Manfredini
01ac20050e Added target ownership check in function copy for safe_mode operations 2001-03-23 09:30:51 +00:00
Sean Bright
90f3e09f08 Fixed prototype. 2001-03-22 14:43:48 +00:00
Sean Bright
e249545165 Fix for bug #9698.
# Anyone that can think of a way to fix long2ip(), feel free.
2001-03-21 13:53:38 +00:00
Andrei Zmievski
d9aa966a44 @- Added array_map() function that applies a callback to the elements
@  of given arrays and returns the result. It can also be used with a
@  null callback to transpose arrays. (Andrei)
2001-03-19 21:20:02 +00:00
Andrei Zmievski
770c66125d @- Added array_filter(), which allows filtering of array elements via
@  the specified callback. (Andrei)
2001-03-16 20:46:33 +00:00
foobar
88f41b4e91 This has got to be the last one.. 2001-03-16 18:18:01 +00:00
Andrei Zmievski
d73ef12429 @- Added array_reduce(), which allows iterative reduction of an array
@  to a single value via a callback function. (Andrei)
- Added array_reduce(), which allows iterative reduction of an array
  to a single value via a callback function.
- Fixed usage of zend_is_callable() in PCRE.
2001-03-12 03:06:53 +00:00
foobar
6795032cb8 HAVE_BINDLIB --> HAVE_LIBBIND 2001-03-11 03:49:21 +00:00
Andrei Zmievski
8d677828b9 @- Fixed argument checking for call_user_func* functions and allowed
@  specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
2001-03-09 21:42:26 +00:00
Zeev Suraski
0117c7848e this function will never return true... 2001-03-04 01:17:21 +00:00
Andrei Zmievski
80cdb812c1 @- Forced call_user_method() and call_user_method_array() to take the
@  object argument by reference. (Andrei)
* Forced call_user_method() and call_user_method_array() to take the
  object argument by reference.
* Also cleaned up the protos for those functions and brought
  call_user_method_array() into functional equivalence with
  call_user_method().
2001-03-02 20:22:14 +00:00
Sascha Schumann
95b3347d8b Provide proper function aliases, if the sendmail functions
don't exist.

Submitted by: Nadir Amra <amra@us.ibm.com>
2001-02-26 20:26:07 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sascha Schumann
a40ee1f181 Actually compile on systems without syslog.
PR: #9412
2001-02-24 21:08:15 +00:00
Andrei Zmievski
1424e36315 Rename to array_search(). 2001-02-20 14:23:03 +00:00
Jason Greene
1888a98a4b Moved the core of in_array into the function php_search_array, which is called by
in_array and search_array (new)

@ Added search_array which works similar to in_array but returns
@ the key instead of a boolean. (jason@php.net)
2001-02-20 05:36:40 +00:00
Sascha Schumann
637e8e14aa There might be more systems which do not support chroot, so we check
for the existence of it.

Additionally, if chroot is not supported, the warn_not_available function
is invoked now.
2001-02-15 05:21:27 +00:00
Derick Rethans
8cef8a9ca1 - chroot does not work on windows 2001-02-15 00:43:44 +00:00
Derick Rethans
4a54a15fc6 - Added the chroot function for changing root in a script.
#- This can be usefull when using PHP in a shell environment, or when PHP
#  runs as CGI which needs a little more security
2001-02-14 10:48:48 +00:00
Zeev Suraski
bf84618244 Fix Windows build 2001-02-05 21:59:17 +00:00
Andrei Zmievski
5355703cf3 Allow calling static methods via call_user_method_* functions. 2001-02-05 17:37:47 +00:00
Rasmus Lerdorf
83cf6629ec @BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
2001-01-21 17:29:15 +00:00
Sean Bright
457888ac44 Put these back where they belong. They weren't necessary unless ZTS and
HAVE_LOCALECONV were both defined.
2001-01-17 20:37:49 +00:00
Sean Bright
a588d65591 Added string comparison function strcoll(). It uses the current locale to
do the comparisons.
@- Added localeconv() and strcoll() functions for localization. (Sean)
2001-01-17 01:10:50 +00:00
Sean Bright
40f3524247 Added localeconv() function. Operates similarly to localeconv() defined in
locale.h.  Should work well under non-ZTS as well as ZTS.
2001-01-14 16:36:30 +00:00
Zeev Suraski
a85da45a66 Both thread-safe and thread-unsafe builds should be ok now 2001-01-13 23:49:44 +00:00
Rui Hirokawa
0afcb03de3 added iconv extension. 2001-01-09 15:11:23 +00:00
foobar
e247b206e0 If TZ environment variable is changed call tzset().
# Although man page for tzset() says it should be called automaticly
# by some of the time related functions, IRL this doesn't happen.
# PR: 3977, 4732, 5510, 6972, 7203, 8502, 8609
2001-01-09 09:02:21 +00:00
Rui Hirokawa
6368933118 added iconv_set_encoding() to change the encoding setting. 2001-01-08 02:39:52 +00:00
Rui Hirokawa
517b81ad43 added a output handler function ob_iconv_handler which tranforms output encoding using iconv(). 2001-01-08 01:40:33 +00:00
Zeev Suraski
338b9b0819 - Make the INI mechanism thread safe (fix necessary API changes from Zend)
- Make the Win32 non-TS configuration build again
2000-12-27 15:43:05 +00:00
Zak Greant
9e9688d1de Removed unused variable from is_scalar 2000-12-20 11:07:20 +00:00
Zak Greant
e4ca57bb57 Added is_scalar() function. 2000-12-18 19:23:50 +00:00
Frank M. Kromann
1e9acc15cf Fixing compilation on Win32. (and others) 2000-12-15 03:04:09 +00:00
Stig Bakken
6e1e78d1c6 @Added iconv() function (using libc or libiconv) (Stig) 2000-12-15 01:01:14 +00:00
Zeev Suraski
be895bcb96 Fix call_user_function() with objects - it could leak under certain circumstances 2000-12-13 22:50:10 +00:00
Sterling Hughes
fe13e4b05d @ Added the call_user_method_array function which allows you to call a method with an
@ arbitrary number of parameters. (Sterling)
2000-12-08 14:37:49 +00:00
Sascha Schumann
9fff35ac9f Hardcode the readdir entry as well 2000-12-07 15:33:30 +00:00
Andrei Zmievski
9b46346a23 We don't want any hard errors in PHP scripts unless absolutely necessary. 2000-12-07 14:54:52 +00:00
Kristian Köhntopp
f5abd4c50b Fugbix in call_user_func_array() if second argument is empty. 2000-12-07 14:14:00 +00:00
Sascha Schumann
4ada3dd3a0 Hardcode all functions which are mentioned in the Large File Support Spec
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
2000-12-07 12:09:38 +00:00
Sterling Hughes
2cc8e2f8c7 @ Added the is_null() function that will return true if a variable is of
@ type null. (Sterling)
2000-11-29 15:37:38 +00:00
Sascha Schumann
949b0893dc The result of conv_z_macros and some manual conversion of
"return_value.*=.*IS_STRING" constructs to RETVAL_STRINGL.
2000-11-27 13:31:21 +00:00
Zeev Suraski
d4fc424554 Fix windows build 2000-11-26 14:25:31 +00:00
Sterling Hughes
0d1bcd480c @ Added the call_user_func_array() function which gives you the ability to
@ call a user function by passing an array of parameters as the second
@ argument.

@ Added the constant() function which returns the value of a constant given
@ the constant's name.
2000-11-24 21:05:25 +00:00
Zeev Suraski
030b707296 Update SAPI modules to interface with the new TSRM.
Enable thread-safety memory debugging in ISAPI when in debug mode
2000-11-18 02:44:04 +00:00
Jesus M. Castagnetto
cc73072804 Updated proto for highlight_file/highlight_string 2000-11-04 01:18:10 +00:00
Zeev Suraski
78194a47b7 - Complete the move to the new INI parser. (Side effect: at last, people
can finally have spaces and tabs in their extension statements...)
2000-10-30 23:39:14 +00:00
Zeev Suraski
f52a59062d parse_ini_file() supports a new optional 2nd argument that instructs it
to divide the directives to arrays according to the sections in which they
reside
2000-10-29 23:34:33 +00:00
Zeev Suraski
4af433d627 Use the new INI parser for parse_ini_str()
- parse_ini_str() is now thread-safe, and supported under Windows (Zeev)
2000-10-29 22:42:01 +00:00
Zeev Suraski
1fd09132c2 Initial steps to move the INI mechanism to the Zend engine 2000-10-29 11:38:26 +00:00
Zeev Suraski
3dc7fc54a0 - URL-opened files now store the HTTP response header in $http_response_header
- Some layout updates
2000-10-28 01:31:56 +00:00
Andrei Zmievski
a35bf41670 Added array_sum() function. 2000-10-25 17:40:11 +00:00
Sascha Schumann
f69a4a431a Fix php://* being handled by the ftp handler 2000-10-22 14:41:02 +00:00
Rasmus Lerdorf
b3fb8a6e97 Aha, Sascha made a mistake! ;)
Make this thing compile again without trans-sid
2000-10-16 22:12:28 +00:00
Sascha Schumann
1c85ad029b Enable users to set the HTML tags to rewrite
through a configuration directive
2000-10-16 17:25:36 +00:00
Hartmut Holzgraefe
6d5f1d97f8 now it works for me as CGI and APXS, with or without --enable-debug ... 2000-10-13 10:04:17 +00:00
Daniel Beulshausen
6fb51171c8 compile fixes & update of win32 dsp 2000-10-13 09:13:01 +00:00
Hartmut Holzgraefe
cae27179ce fopen wrappers cleanup
- comfiguration is now done by an ini parameter
    instead of a compile time option
  - the implementations of the three standard wrappers
    now live in seperate files in ext/standard
  - the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Hartmut Holzgraefe
be19c812ab added some missing protos 2000-10-11 11:25:13 +00:00
Sascha Schumann
e2efb3cf06 Remove unnecessary include directive 2000-09-19 17:39:43 +00:00
Zeev Suraski
c45b1c2c8b - Fix warnings
- Fix URL scanner startup crash
2000-09-19 17:37:34 +00:00
Sascha Schumann
4b3fb7b05e Add new URL scanner. This version is up to 20% faster. It will be
enabled by default once I'm sure that it works in every case.

To enable it, apply s/url_adapt_ext/url_adapt_ext_ex/ to session.c
2000-09-19 17:32:27 +00:00
Zeev Suraski
6c3d7449e1 - Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
2000-09-12 20:48:33 +00:00
Daniel Beckham
b852f3941f reversed chomp alias addition as per Andi Gutmans' request 2000-09-12 19:00:21 +00:00
Daniel Beckham
5925071957 added chomp() alias for chop() for us Perl purists. 2000-09-12 15:54:10 +00:00
Stanislav Malyshev
1ccac6ed55 Add additional parameter to parse_str for saving result (thanks to
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Sterling Hughes
0b9a78cb1e @- Added the pathinfo() function. (Sterling) 2000-09-10 05:59:16 +00:00
Zeev Suraski
6c4cb4c079 Security related updates:
- Introduce php_open_temporary_file(), in place of tempnam().  Still
  needs testing under UNIX (mkstemp()), works reliably under Windows now.
- Reimplement the mechanism for unlinking uploaded files at the end of the request
  (was it ever tested?).  Files moved with move_uploaded_file() will not be unlink()'d
  again, to avoid (albeit very unlikely) race conditions.
2000-09-09 11:41:14 +00:00
Zeev Suraski
3edf46ff73 Implement move_uploaded_file() (untested) 2000-09-08 22:31:21 +00:00
Andrei Zmievski
b409d2f9ea is_uploaded_file() is probably a better name. 2000-09-08 21:58:28 +00:00
Zeev Suraski
75086e3088 - Implemented is_upload_file() 2000-09-08 21:56:47 +00:00
Stanislav Malyshev
3fb701add0 More fixes fo ini_ handling functions 2000-09-05 18:33:02 +00:00
Rasmus Lerdorf
4a22d2e832 Add EscapeShellArg() function which turns a b into 'a b' and
a'b into 'a'\''b'
@Add EscapeShellArg() function (Rasmus)
2000-09-05 16:55:32 +00:00
Stanislav Malyshev
be83e732af Fix ini_restore variable length 2000-09-05 14:23:16 +00:00
Sterling Hughes
9f86ff884f @Add a php.ini option session.use_trans_sid to enable/disable trans-sid. (Sterling) 2000-09-04 22:21:10 +00:00
Sam Ruby
0240a571c8 Unitialized variable causes trap on Windows 2000-09-02 15:54:18 +00:00
Andrei Zmievski
cd8af6aa44 @- Added support for user defined 'tick' callback functions. This helps
@  emulate background processing. (Andrei)
2000-09-01 16:10:17 +00:00
Rasmus Lerdorf
fc3acfc4d5 Some minor cleanup to make W3C's tidy validator happy 2000-08-27 22:46:40 +00:00
Stig Bakken
7eeda99a05 @Added php_uname() function (Stig)
Added php_uname() function.
2000-08-27 19:42:45 +00:00
Stig Bakken
03471b21ee @Added ob_get_length function (Stig)
Added ob_get_length() function (returns size of buffer)
2000-08-25 03:10:42 +00:00
Zeev Suraski
c542f9a3f4 - Fix IMAP build problem
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Stanislav Malyshev
5a7409ee1a Fix by-reference passing for scanf's
@- Fix by-reference parameters passing for xml_ functions and for scanf functions (Stas)
2000-08-20 16:09:06 +00:00
Zeev Suraski
7a45e3cb89 - Update NEWS
- Fix non ZTS Windows build
2000-08-19 18:01:04 +00:00
Stanislav Malyshev
65bb194d65 Fix byteorder for il2long and long2ip (#6159)
@- Fix byte order for ip2long and long2ip (Stas)
2000-08-15 10:32:55 +00:00
David Croft
1a5d90c4ea presumably this was wrong 2000-08-14 08:37:28 +00:00
Zeev Suraski
a120608807 Make COM work in a multithreaded environment 2000-08-11 13:30:37 +00:00
Thies C. Arntzen
57faf76605 fix #6061 2000-08-09 17:52:30 +00:00
Hartmut Holzgraefe
ea5ab044bf trans-sid rewrite, is now state-aware (fix for bug #3411 and friends) 2000-08-01 07:45:14 +00:00
Egon Schmid
e4b7e9e916 Protos fixed. 2000-07-26 11:43:01 +00:00
David Croft
83513d9580 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
Added a few RCS $Id$ tags.

# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
2000-07-24 01:40:02 +00:00
Thies C. Arntzen
9752d1a089 (getimagesize) fix FORCE_REF. 2000-07-23 16:49:42 +00:00
David Croft
8dd1fdb1a0 wordwrap function from Chris Russel <russel@yorku.ca>
differences from his patch:
 - wordwrap width and wrap-string now optional parameters
   (default to 75 and "\n" respectively)
 - wordwrap_byte is now just an automatic special case of wordwrap
 - Zend API compliant

@- Added new function "wordwrap" to wordwrap long strings from Chris
@  Russel <russel@yorku.ca> (David Croft)
2000-07-22 01:12:24 +00:00
Andrei Zmievski
885e40db05 @- Updated str_pad() to be able to pad on left/right/both sides. (Andrei) 2000-07-08 20:38:23 +00:00
Andi Gutmans
b9037f7d69 - Make PHP compile again under Windows.
- Please be careful when you make such changes.
2000-07-02 15:12:34 +00:00
Kristian Köhntopp
0249137148 unlink() is not a function related to HAVE_SYMLINK. It is being
used to delete files (actually, in Unix, names of files, as in
Unix nobody has deleted a file, ever).
2000-07-02 13:41:26 +00:00
Zeev Suraski
7fb72c1726 Fixed opendir() thoroughly 2000-06-29 21:51:40 +00:00
Kristian Köhntopp
02cad904ee ezmlm_hash() function also available for php4. 2000-06-29 14:07:10 +00:00
Kristian Köhntopp
c54fa54e36 Added function php_sapi_name() as written by Stefan Livieratos. 2000-06-26 14:43:37 +00:00
Egon Schmid
ac523aa37e Correct protos call_user_func() and call_user_method(). 2000-06-24 18:46:17 +00:00
Sascha Schumann
2297f670b1 Change the serialization semantics to:
* if a certain object is of class INCOMPLETE_CLASS, the serializer will
    lookup the previously stored original class name of that object, and
    use that class name to serialize the object.

Change the deserialization semantics to:

  * if the class of an object, which is to be instantiated, is not found
    in the current context, the class name will be stored for later
    retrieval, and the class of that object is changed to INCOMPLETE_CLASS.

All function calls, property gets, and property sets operating on an
object of class INCOMPLETE_CLASS cause the execution to halt and to
output an informative error message.
2000-06-23 16:21:31 +00:00
Thies C. Arntzen
cfa7028d66 @- added spliti() function. (Thies) 2000-06-23 11:48:02 +00:00
Rasmus Lerdorf
777f8dccca Add a crc32 checksum function - used by the udm_search search engine
and currently run through a system call.  This will speed up the udm_search
php frontend significantly.
@ Add a crc32 checksum function - used by the udm_search search engine
@ and currently run through a system call.  This will speed up the udm_search
@ php frontend significantly. (Rasmus)
2000-06-21 22:51:29 +00:00
Ben Mansell
6a449f2b02 Initialise lcg_globals correctly
# Fixes bug 5075
2000-06-20 11:35:12 +00:00
Zeev Suraski
da66298659 - Fix a couple of wranings in the FTP code and in parsedate.y
- Be safer with LC_MESSAGES
- Align with the latest Zend change in call_user_function_ex()
2000-06-17 16:49:03 +00:00
Brian Moon
e38d7accb7 set_file_buffer was not being exported. This is now fixed. 2000-06-15 19:02:02 +00:00
Andrei Zmievski
e5360259a4 We should define symlink functions only when HAVE_SYMLINK is defined.
Otherwise, they should be aliased as not available.
2000-06-13 18:07:19 +00:00
Sascha Schumann
d1c1e99d98 Rename phpmath.h to php_math.h. 2000-06-13 16:31:57 +00:00
Sascha Schumann
165361a515 Remove single ; 2000-06-13 09:06:31 +00:00
Stig Venaas
f18b903d5f Changed array_subtract to array_diff 2000-06-10 19:09:56 +00:00
Stig Venaas
99f151f1bd Adding fuctions array_unique, array_intersect and array_subtract. 2000-06-10 18:58:45 +00:00
Andi Gutmans
6ce07a85e4 - Change register_internal_class to zend_register_internal_class for
- consistency.
- Andrei: I'm still thinking about the _ex you want me to implement
2000-06-09 08:41:59 +00:00
Thies C. Arntzen
c183168481 beautify 2000-06-07 09:55:37 +00:00
Andrei Zmievski
b928bdceb8 @- Added str_pad() for padding a string with an arbitrary string on left or
@  right. (Andrei)

Added str_pad() for padding a string with an arbitrary string on left or right.

# With all those macros, the code is starting to eerily resemble Perl's guts.
2000-06-06 20:42:33 +00:00
Clayton Collie
0b7fd17c2b Added sscanf() function. 2000-06-06 18:58:15 +00:00
Thies C. Arntzen
10eb67a3aa @- added fflush() function. (Eric Huss)
# the socket fsync() might not work on Win32.
#
# i'm not sure if we need any code for flushing sockets as they are
# currently alway written via write().
2000-06-06 12:16:44 +00:00
Sascha Schumann
102c6ce4b8 Move main.h to php_main.h. 2000-06-05 23:24:42 +00:00