Commit Graph

641 Commits

Author SHA1 Message Date
Wez Furlong
fc1ef270ce Implement curl based wrappers.
Currently read-only, and http is the only thing tested.
Because of this, using them can be controlled by configure:

--with-curlwrappers     Use CURL for url streams

Not for production use...

This enables http, https, ftp and ldap protocols as streams.
2002-08-12 15:56:13 +00:00
Marcus Boerger
fd26a5c0a9 -New function ob_list_handlers
@- Added ob_list_handlers() which returns an array of all active output
@  handlers. (marcus)
2002-08-05 03:09:42 +00:00
Hartmut Holzgraefe
e5fa36eee4 added money_format() function
this is similar to C-libs strfmon(), using the same format string
semantics but a different function prototype, so i decided to
give it a more speaking name similar to number_format()
2002-08-02 10:08:53 +00:00
Stefan Esser
bffe4cf222 Added sha1, sha1_file functions. 2002-07-28 19:18:08 +00:00
Derick Rethans
b7cc9f7447 - Added parameter to print_r which returns the variable representation
instead of echoing it.
@- Added parameter to print_r which returns the variable representation
@  instead of echoing it. (Derick)
2002-07-25 11:22:20 +00:00
Jason Greene
9b68acb7f7 @Fixed infinite recursion crash bug in ticks (Jason)
Prevent reenterant calls to a user tick function by flagging the function
entry during call.

This prevents code like the following from infinitely recursing until a
crash occurs:
<?php

register_tick_function(a);

declare(ticks=1) {
	function a() {
		print "blah\n";
	}
	;
	;
	;
	;
}
?>
2002-07-16 14:14:22 +00:00
Jason Greene
d907b2d525 @Fixed socket_set_timeout on win32 (Jason, Edin, Jani) 2002-07-10 15:23:47 +00:00
Derick Rethans
728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Derick Rethans
c73733c59a - Fix windows build
#- I could not test this, please try!
2002-07-03 06:45:01 +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
1f56d4ba08 -imagetype2mimetype renamed to image_type_to_mime_type 2002-06-23 00:43:11 +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
foobar
01dff4d97a - Fixed bug #17669. PG(magic_quotes_runtime) wasn't reset for each request. 2002-06-12 17:25:48 +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
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
e919e7e526 unused var 2002-05-04 16:59:41 +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
Wez Furlong
760573695c Implement user-space funtions to operate on stream contexts. 2002-04-30 00:28:24 +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
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
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
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
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
Hartmut Holzgraefe
10811cd0d8 getting rid of the warn_not_available alias 2002-03-22 01:10:31 +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
Andrei Zmievski
1cf188ae1b Fix compilation when PCRE is disabled. 2002-03-21 15:28:46 +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
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
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
Zeev Suraski
73e79322ba Fix the build and all of the outstanding VC++ warnings 2002-03-18 08:05:28 +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
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