Commit Graph

179 Commits

Author SHA1 Message Date
Ilia Alshanetsky
b03d3fa5b7 Added php_strip_whitespace() and php_check_syntax() functions. 2003-11-24 01:17:27 +00:00
Ilia Alshanetsky
c53b53f926 Rename nanosleep() to time_nanosleep(). 2003-11-14 22:55:54 +00:00
Ilia Alshanetsky
127ed194b7 Added configure check for nanosleep() availability. 2003-11-12 23:43:46 +00:00
Ilia Alshanetsky
3691ab699c Added nanosleep(), in addition to allowing setting of very short states.
This function is signal safe.
2003-11-12 22:02:37 +00:00
Marcus Boerger
220e41a421 Move typedef to where it is needed now. 2003-11-07 09:26:18 +00:00
Moriyoshi Koizumi
921e5b47c5 Fix fgetcsv() to correctly support international characters
# note: mblen() is not a mbstring function, but is part of the ANSI standard
# which is even supported by Microsoft's libc.
2003-10-04 02:51:19 +00:00
Moriyoshi Koizumi
12ac36ca8d Move shutdown code to better place 2003-08-07 19:53:31 +00:00
Zeev Suraski
90b29aa076 Replace fast_call_user_function() with zend_call_function() 2003-08-05 10:29:03 +00:00
Sebastian Bergmann
10ec176f69 Buckle your seatbelt, Dorothy, 'cause Aggregation is going bye-bye. 2003-06-28 05:38:52 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sterling Hughes
9ac50a13d7 convert array functions to use fast_call_user_function(), gives a nice
performance win.
2003-05-20 16:46:53 +00:00
Derick Rethans
92f0da58e6 - Rename stream_register_filter() to stream_filter_register(),
stream_register_wrapper() to stream_wrapper_register() and added an alias for
  the latter change.
2003-05-19 15:35:06 +00:00
Sebastian Bergmann
b8e3e0bfe3 Sorry Sterling, but this broke the ZTS build and I'd rather not 'ZTS fix' an April's Fool joke. 2003-04-01 05:30:32 +00:00
Sterling Hughes
53d90d8b9b Add the landonize() and landonize_url() functions which provide a secure
alternative to the sha1() and sha1_file() functions.
2003-04-01 05:01:50 +00:00
Sara Golemon
c4a491e12c Adjustment to user filters reimplementation. Make a bucket an object containing a resource(the real bucket) and a data element for direct operations. Simplifies
user interface and reduces number of function calls/reallocs needed.
2003-03-09 23:12:31 +00:00
Sara Golemon
85a5ef3ec9 Initial re-implementation of userfilters after filterchain redesign by wez. More userspace API to come. 2003-02-24 21:56:19 +00:00
Wez Furlong
59e4fdcc10 Implement fprintf() and vfprintf().
Add a couple of tests.
2003-01-09 17:29:31 +00:00
Sara Golemon
43630e2ac0 Added stream_get_filters(); to list registered filters 2003-01-05 03:24:38 +00:00
Wez Furlong
350b0bbeac Implement user-space filters.
See ext/standard/tests/file/userfilters.phpt for an example of their use.
2002-12-31 18:39:36 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Stig Bakken
efeaa5917c Added separate functions for setting include_path, for environments
where ini_set has been disabled.  New functions: get_include_path(),
set_include_path(), restore_include_path()
2002-11-05 06:05:48 +00:00
Jon Parise
033224784b @ - Added getopt() for parsing command line options and arguments. (Jon) 2002-09-30 03:02:52 +00:00
Wez Furlong
c74b9faca5 Implement a default_socket_timeout and auto_detect_line_endings ini options.
Also move user_agent from BG to FG.
2002-09-23 18:12:39 +00:00
Sterling Hughes
91df221ab7 @ Made the User-Agent that php's fopen wrappers send, configurable via
@ php.ini or via a stream context. (Sterling)

The stream context is untested, but it should/could work :)  Either way it
doesn't make the rest of the code bad. Wez -- please take a looksie for me
:)
2002-09-07 15:45:29 +00:00
Derick Rethans
1f9b519c55 - Remove read_uploaded_file 2002-03-23 23:03:04 +00:00
Derick Rethans
e2f110d982 - Added read_uploaded_file (patch by Andrew Sitnikov <sitnikov@infonet.ee>) 2002-03-23 14:10:57 +00:00
Andrei Zmievski
513e598d1e Adding object aggregation capability along with tests. 2002-02-21 03:32:42 +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
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
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
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
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
Sterling Hughes
97fea0931c Make rand thread safe when ZTS is defined. 2001-09-16 20:49:57 +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
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
f47962c7c0 Implement import_request_variables() 2001-08-08 20:05:37 +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
Zeev Suraski
b1de7fc900 More TSRMLS_FETCH annihilation. Enough for today... 2001-07-31 07:09:49 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Sascha Schumann
e8fe8f9d99 Provide typedefs for php_int32 2001-07-18 22:54:55 +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
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
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
Sascha Schumann
d5cfb03ac9 munmap() file in RSHUTDOWN, if PHPWRITE fails. 2001-05-18 23:38:46 +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
Zeev Suraski
0117c7848e this function will never return true... 2001-03-04 01:17:21 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Rui Hirokawa
0afcb03de3 added iconv extension. 2001-01-09 15:11:23 +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
Zak Greant
e4ca57bb57 Added is_scalar() function. 2000-12-18 19:23:50 +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
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
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
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
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
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
fa6bb59773 Fix build 2000-09-08 22:26:07 +00:00
Zeev Suraski
75086e3088 - Implemented is_upload_file() 2000-09-08 21:56:47 +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
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
Zeev Suraski
c542f9a3f4 - Fix IMAP build problem
- Allow external DLLs to use warn_not_available
2000-08-24 18:49:49 +00:00
Sascha Schumann
8e0ae5d152 Cleaning up some mess 2000-08-21 09:50:53 +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
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
Sascha Schumann
16017f6d78 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use by the
  implementation.
2000-07-02 23:46:51 +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
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
Zeev Suraski
c07a056dac There's really no need for an entire file for a one line function... 2000-05-29 16:13:38 +00:00
Sascha Schumann
9cd4929417 Make syslog module thread-safe. 2000-05-28 16:19:45 +00:00
Andrei Zmievski
ddf3740cf9 @ Added is_numeric() that returns true if the argument is a number
@ or a numeric string. (Andrei)
2000-03-16 16:02:23 +00:00
Stig Bakken
99e0b36321 @Cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single
extension.
2000-03-06 20:37:11 +00:00
Andrei Zmievski
0e18779e8b @Added ip2long() and long2ip() courtesy of Faisal Nasim <faisal@nasim.org> 2000-03-04 17:28:16 +00:00
Zeev Suraski
d34b144061 @- Added parse_ini_file(). Currently implemented in non thread safe version
@  of PHP, and currently lacks section support (Zeev)
- Bring the non thread safe .dsp's uptodate
2000-03-04 02:59:14 +00:00
Zeev Suraski
fd344d3602 @- Added ini_set() as an alias to ini_alter() (Zeev) 2000-02-26 14:53:18 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
29280bb9ec - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 2000-02-10 21:53:56 +00:00
Zeev Suraski
86a19f4714 Add the complement to the putenv() security 2000-01-31 22:31:00 +00:00
Zeev Suraski
53a0d6fb9d Fix typo 2000-01-30 22:14:58 +00:00
Zeev Suraski
5540028340 @- Added the ability to prevent the user from overriding certain environment
@  variables in Safe Mode (Zeev)
- Finished work, more or less
2000-01-30 22:10:30 +00:00
Zeev Suraski
01362974d6 Some more work, I'll finish this when I get home 2000-01-30 20:49:16 +00:00
Zeev Suraski
430571d62c Initial work on the protected env vars stuff 2000-01-30 20:31:41 +00:00
Zeev Suraski
90f1218fbb - Change uint32 to php_uint32 (PostgreSQL defines uint32, and perhaps other packages too)
- PostgreSQL finally compiles&links
1999-12-26 00:18:44 +00:00
Zeev Suraski
fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Andrei Zmievski
8f17fbb900 Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions.
@ Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
1999-12-16 23:47:10 +00:00
Andrei Zmievski
1be7a8d461 Moved function_exists() to Zend library. 1999-12-14 22:15:55 +00:00
Sascha Schumann
e911ee38bd Make rand.c thread-safe. 1999-12-13 18:31:29 +00:00
Sascha Schumann
61a6a92618 Make filestat.c thread-safe 1999-12-12 16:48:54 +00:00
Sascha Schumann
d9258da42e @- Made pageinfo.c thread-safe (Sascha) 1999-12-12 16:14:40 +00:00
Sascha Schumann
3b515617a4 Make array.c thread-safe 1999-12-01 17:21:52 +00:00
Sascha Schumann
6216edda44 Make basic/string functions thread-safe 1999-11-28 00:31:02 +00:00
Andrei Zmievski
438addf331 Split array functions into separate module. 1999-11-13 20:31:54 +00:00