Commit Graph

1828 Commits

Author SHA1 Message Date
foobar
001df0d028 Yet another TSRM fix. 2001-08-07 20:13:54 +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
foobar
ac28ca9d85 killed a compile warning. 2001-08-07 19:21:19 +00:00
Andrei Zmievski
32440e3051 Fix a couple of leaks. 2001-08-07 16:41:33 +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
23b9300fd1 more tsrm cleanup 2001-08-06 03:50:52 +00:00
Jeroen van Wolffelaar
dce78d75d6 Removed some duplicate code out of addclashes
# Not TSRM-safe, I am afraid...
@- addcslashes now warns when charlist is invalid. The returned string
@  remained the same (Jeroen)
2001-08-05 23:08:19 +00:00
Jeroen van Wolffelaar
b3a7b945fa Fix test 2001-08-05 20:27:24 +00:00
Jeroen van Wolffelaar
ec140f4f67 Bugfix in abs(), abs(LONG_MIN) was bogus 2001-08-05 20:27:03 +00:00
Sebastian Bergmann
b4f31ecef5 Fix ZTS build. 2001-08-05 20:25:40 +00:00
Jeroen van Wolffelaar
2e6850a91d Added proto for php_charmask in the .h 2001-08-05 20:02:22 +00:00
Jeroen van Wolffelaar
4a01a15fd2 Error-handling for the second parameter of [l|r]trim 2001-08-05 19:38:49 +00:00
Jeroen van Wolffelaar
71a6c03bef Didn't commit the correct trim.phpt, it now passes 2001-08-05 19:06:34 +00:00
Jeroen van Wolffelaar
860be31cae More tests 2001-08-05 18:38:48 +00:00
Sascha Schumann
a19563c8dc more tsrm cleanup 2001-08-05 16:52:29 +00:00
Sascha Schumann
480ffb3d75 more tsrm cleanup 2001-08-05 16:43:57 +00:00
Sascha Schumann
b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +00:00
Sascha Schumann
373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Stanislav Malyshev
c7d7834a43 Check that _php_math_basetolong result fits long (by request from Troels Arvin) 2001-08-05 14:40:14 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
foobar
d800a2e16a - Fixed bug: #10822
- CRYPT_SALT_LENGTH is now set to the maximum length the system
  supports, like it has been in the documentation for ages.
- The automatic salt is now also working like it should.
2001-08-04 23:58:56 +00:00
Jeroen van Wolffelaar
c105f7142f Better abs() testing 2001-08-04 21:40:34 +00:00
Jeroen van Wolffelaar
fcf57d371d Layout: revert accidentel joining of lines 2001-08-04 21:37:43 +00:00
Jeroen van Wolffelaar
2b17cd1982 Named some constants in filestat to improve readability 2001-08-04 21:34:11 +00:00
Jeroen van Wolffelaar
68df8ea465 Another bugfix in pow. Special cases, with 10 times the same thing are
_so_ error_prone... :(
2001-08-04 20:58:47 +00:00
Rasmus Lerdorf
7d5999fb4d Kill a warning 2001-08-04 20:52:35 +00:00
Jeroen van Wolffelaar
b245789bdb Bugfix. All tests pass now on my system 2001-08-04 18:29:37 +00:00
Jeroen van Wolffelaar
58ee4e47a4 Fix bug in the tests :-(
There seems to be one real bug in pow(), I'm trying to fix it...
2001-08-04 18:03:29 +00:00
Thies C. Arntzen
dca5f8dce4 fix serialize:
- keys no longer have a trailing \0
- no leak on calling __wakeup (also saved 2* malloc & free)
- serializing objects that implement __sleep() works again
- make test works again:-)
2001-08-04 17:29:54 +00:00
Andrei Zmievski
bffbe675f9 @- Fixed a crash bug in array_map() when NULL callback was passed in. (Andrei) 2001-08-04 16:54:20 +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
Sean Bright
d789d45a2e WS Pollution 2001-08-04 13:47:44 +00:00
Jeroen van Wolffelaar
0cf60d749e Added tests for pow()
#The tests near LONG_MAX/MIN fail, I know that
2001-08-04 13:20:31 +00:00
Jeroen van Wolffelaar
8803bbaa80 - A little bit cleaning of pow(), and 12 bytes less memory (wow) 2001-08-04 13:11:17 +00:00
Sean Bright
fff883689e Don't allocated quoted strings unless we are in a META tag. 2001-08-04 12:36:51 +00:00
Sebastian Bergmann
724b4d409c Eliminate TSRMLS_FETCH() call. 2001-08-04 05:37:11 +00:00
Sebastian Bergmann
ea79632b29 Fix Win32 (and maybe other ZTS) builds. 2001-08-04 05:22:55 +00:00
Sascha Schumann
c947a0739e Clean up the serializer by modularizing some of its code. That also
enables us to serialize hash indices without creating zvals for them.
Due to its nature, this patch also includes some whitespace changes.
2001-08-04 03:30:38 +00:00
Jeroen van Wolffelaar
dc4adaa231 #- HTML-safe error for pow() 2001-08-03 23:27:23 +00:00
Jeroen van Wolffelaar
b32f1ab299 #- Fix silly bug that caused segfault 2001-08-03 23:10:04 +00:00
Jeroen van Wolffelaar
f0bcaf3901 Un-revert patch 2001-08-03 23:09:05 +00:00
Jeroen van Wolffelaar
f6979a7d2b Reverting last patch, segfaults. 2001-08-03 22:42:02 +00:00
Jeroen van Wolffelaar
7733d95770 - New pow() function. It now gives warnings on wrong input, and
returns integer result when possible
@- New pow() implementation, which returns an integer when possible,
@  and warnings on wrong input (jeroen)
2001-08-03 22:19:11 +00:00
Jeroen van Wolffelaar
c2150f7038 - Added new parameter to [l|r]trim, to specify _what_ to trim
@- Added optional second parameter to trim, chop and ltrim. You can
@  now specify which characters to trim (jeroen)
2001-08-03 22:12:46 +00:00
Jeroen van Wolffelaar
49c16290f3 - Fix array_sum to switch to float on overflow. Fixes bug#12505 2001-08-03 19:18:51 +00:00
Sascha Schumann
d6dc2ba6bc Treat trailing zeroes correctly 2001-08-03 11:09:13 +00:00
Sascha Schumann
723bbcbea0 Do the nul'ifiying of php_var_serialize's result at the right place 2001-08-03 11:00:16 +00:00
Sascha Schumann
f6ed403fde Don't copy the strtok parameter 2001-08-03 09:50:38 +00:00
Sascha Schumann
84aed3b718 Fix a possible segfault (Thanks to Sebastian for catching it) 2001-08-03 09:36:14 +00:00
Sascha Schumann
3459f05a07 NUL-terminate string 2001-08-03 09:35:33 +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
Sascha Schumann
4dfa91543c Convert serializer to smart_str.. avoids lots of sprintf's and
copying of data.
2001-08-03 07:25:27 +00:00
Zeev Suraski
2ec440078a Get rid of a couple of bogus persist_alloc()'s, and some cleanup 2001-08-03 07:15:14 +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
foobar
bad630553b fix build. 2001-08-01 00:13:02 +00:00
Zeev Suraski
15cb7ca021 Fix some warnings 2001-07-31 23:32:24 +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
aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
e629be7b5b Fix a crash bug in assert 2001-07-31 02:59:44 +00:00
Zeev Suraski
9f4c0ae6c0 More TSRMLS_FETCH work 2001-07-30 09:16:46 +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
354f1158d8 *** empty log message *** 2001-07-29 08:40:41 +00:00
Andi Gutmans
442890f3e1 - And more... 2001-07-29 08:20:30 +00:00
Andi Gutmans
b99a590be3 - More object macros 2001-07-29 08:14:29 +00:00
Andi Gutmans
d42f85427a - Use object macros 2001-07-28 18:40:18 +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
Sascha Schumann
d256fbf2b8 Get rid of memchr in SEARCHCR(). 2001-07-25 21:06:01 +00:00
Andi Gutmans
afaa0085bb - MSHUTDOWN needs to return SUCCESS/FAILURE 2001-07-24 03:52:16 +00:00
Thies C. Arntzen
b660a9f553 fix newly introduced mem-leak in assert-module 2001-07-23 16:13:34 +00:00
Sascha Schumann
8492ece5f6 While researching a crash-bug in mail(), I found these two goldies.
Replace php_escape_shell_(arg|cmd) with straight-forward implementations.
2001-07-22 21:32:55 +00:00
Rasmus Lerdorf
cc44119bf6 Left-over outdated comment 2001-07-21 15:51:40 +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
Zeev Suraski
20d53346ce Remove redundant code 2001-07-21 12:43:23 +00:00
Sascha Schumann
09ce807bf1 Drop memchr() in php_memnstr in favor of manual scanning. This reduces
the complexity of the function and is about 20% faster on Linux/x86.
2001-07-21 03:26:31 +00:00
Zeev Suraski
38e5a2077d Clarify and optimize 2001-07-21 01:15:18 +00:00
Rasmus Lerdorf
bf513871bc Fix more crashes related to this switch to z_value 2001-07-21 00:14:14 +00:00
Zeev Suraski
11c2acc34a Retain downwards compatibility - cool idea Jon :) 2001-07-20 17:10:04 +00:00
Zeev Suraski
ef9504cafc Fix UNIX build 2001-07-20 15:06:51 +00:00
Zeev Suraski
6f297a370a Fix Windows build 2001-07-20 14:40:30 +00:00
Zeev Suraski
13ac04b8e5 Avoid getting bailouts on text output during shutdown. Text output is now
'officially' disabled during shutdown (this doesn't change the Apache module
behavior, but may change behavior of other server modules, in which it was
possible to emit output during shutdown;  I think it's a good step towards
consistency, though)
2001-07-20 13:59:00 +00:00
Sascha Schumann
4ebcdd9929 Add optional support for using boyer-moore to str_replace. 2001-07-20 01:22:29 +00:00
Stanislav Malyshev
dfe15ad070 Fix warnings 2001-07-19 08:12:12 +00:00
Sascha Schumann
dcc60b7f4a The lcg needs to operate on signed 32-bit integers, so use
the proper php_int32 types here.
2001-07-18 22:55:52 +00:00
Sascha Schumann
e8fe8f9d99 Provide typedefs for php_int32 2001-07-18 22:54:55 +00:00
Stanislav Malyshev
f0c879bb26 Make variables receiving long be long
Fix binary (x,o,b) formats - they should not be signed
2001-07-18 16:48:52 +00:00
Stanislav Malyshev
cdf0532ad3 Make read always 0-terminate strings 2001-07-16 15:44:36 +00:00
Zeev Suraski
2edcf835ed Update cast 2001-07-15 22:49:25 +00:00
Zeev Suraski
94f5950438 Get rid of var_uninit() 2001-07-15 19:03:04 +00:00
Zeev Suraski
85b4df53c0 Improved interactive mode - it is now available in all builds, without any significant slowdown 2001-07-15 14:08:58 +00:00
Zeev Suraski
4e1c65b42b Fix an inline 2001-07-15 14:08:23 +00:00
Andi Gutmans
fbc8f3f51d - Faster without calling strlen() 2001-07-14 16:41:58 +00:00
Rasmus Lerdorf
8406c2d682 Fix for bug #11632 2001-07-14 15:08:36 +00:00
James E. Flemer
771e3e498f o Fixed Bug #12121: chdir and safe_mode
- [ main/safe_mode.h ] added new checkuid mode:
    CHECKUID_ALLOW_ONLY_FILE: skips directory check if file check
	fails

  - [ ext/standard/dir.c ] changed php_checkuid() to use
    CHECKUID_ALLOW_ONLY_FILE instead of CHECKUID_ALLOW_ONLY_DIR

  - [ main/safe_mode.c ] added code for new checkuid mode

o Fixed Bug #12119: safe mode owner check can be bypassed with symlink
  - [ main/safe_mode.c ] use VCWD_REALPATH to resolve destination
    of symlink before trimming filename

o New Feature: safe_mode_include_dir (php.ini directive)
  - Allows bypassing UID/GID checks when including files
    from the directory in safe_mode_include_dir and its
	subdirectories. (safe_mode must be on, directory must
	also be in include_path or full path must be used when
	including)

o Fixed Feature: safe_mode_gid (php.ini directive)
  - Correctly check (and report) UID/GID bits on directories

o Changed include() fall back to scripts cwd implementation
  - CWD added to the (local) search path in php_fopen_with_path()
    instead of seperate case. [ main/fopen_wrappers.c ]
2001-07-13 18:21:21 +00:00
Thies C. Arntzen
ba17fadbfb @ - Fixed crash in iptcparse() if the supplied data was bogus. (Thies) 2001-07-13 14:35:05 +00:00
Sascha Schumann
87d99aa93c Allow extensions to define custom prealloc sizes 2001-07-11 23:13:55 +00:00
Thies C. Arntzen
5676e5ad05 use ZVAL_* macros 2001-07-11 15:27:37 +00:00
Thies C. Arntzen
0ef0f8e32b ZVAL_BOOL(v,0) -> ZVAL_FALSE(v) 2001-07-11 12:42:25 +00:00
Stanislav Malyshev
adc98200d6 More correct pseudo-fix
# This is not really a fix. This thing is still broken. I will think on
# how to really fix it. Any suggestion is *welcome*.
2001-07-11 11:45:05 +00:00
Zeev Suraski
66d94bc655 Nuke zval_reset 2001-07-11 11:39:10 +00:00
Zeev Suraski
d70ce7be27 var_reset -> ZVAL_RESET 2001-07-11 09:39:09 +00:00
Shane Caraveo
ff4dfc56f2 prevent php from crashing when serializing circular data.
This script produced the crash.
<?
$hash["test_key"] = "test_value";
$hash["hash_key"] = &$hash;
echo serialize($hash);
?>
2001-07-11 05:57:18 +00:00
Rasmus Lerdorf
45d71e2951 Make range() function smarter
@ - Improve range() function to support range('a','z') and range(9,0)
@   types of ranges.  (Rasmus)
2001-07-09 20:36:47 +00:00
Andrei Zmievski
f42519ffbd *** empty log message *** 2001-07-09 18:54:59 +00:00
Sascha Schumann
aee2ff3ec9 __USE_GNU should not be defined by an application. 2001-07-09 17:44:07 +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
Derick Rethans
9869ecc9b7 - Added php_escape_shell_arg to the header file 2001-07-09 17:02:50 +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
Thies C. Arntzen
e7b01fc53c added test for assert 2001-07-09 09:08:14 +00:00
Thies C. Arntzen
08546ef0e8 changed to use Z_* macros 2001-07-09 09:04:19 +00:00
Thies C. Arntzen
1be0975dff added test for serialize
changed var.c to use Z_* macros
2001-07-09 09:03:06 +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
Shane Caraveo
fd2c27c061 Enable using an external mailer under windows.
1. this depends on the patch to fix tsrm I sent to dev
2. this provides backwards compatibility, as long as sendmail_path in the ini file is empty, the old internal mailer will be used, once sendmail_path is defined, the external sendmail program will be used.

I tested with indigomail from www.indigostar.com, which provides the same command line interface as sendmail no linux.
2001-07-08 22:30:11 +00:00
Sascha Schumann
69d129bdfb Needed for the prototype of php_escape_shell_cmd(). 2001-07-08 19:09:59 +00:00
Sean Bright
9d05cba6b8 This should be lower-cased per the documentation and previous
implementation.
2001-07-05 23:29:11 +00:00
Wez Furlong
4948cb1691 More ifdefs, just in case. 2001-07-05 10:53:15 +00:00
Wez Furlong
ca9c4b3753 Added loads of #ifdefs; should fix Bug #11889. 2001-07-05 10:49:58 +00:00
Derick Rethans
832fe2e636 - Fix for the first part of Bug #11890
@- Fixed a bug that allowed users to spawn processes while using the 5th
@  parameter to mail(). (Derick)
2001-07-05 08:47:37 +00:00
Jason Greene
e48bc17c58 Fix build on linux
Heads up Wez
2001-07-05 07:12:28 +00:00
Sascha Schumann
ef13ab5750 Improve url scanner speed (up to 40% for large chunks of data)
and handle some corner cases better.  The scanner has been changed
to the format as proposed in "RE2C - A More Versatile Scanner Generator"
by Cowan et al.
2001-07-04 15:30:21 +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
Zeev Suraski
551f1831a7 Fix a major thread safety bug in the output mechanism
@- Fixed a major memory corruption bug in the thread safe version (Zeev)
2001-07-02 18:17:10 +00:00
Derick Rethans
91424b2b91 - Fixed proto's (Patch by Zak) 2001-07-02 11:11:58 +00:00
Daniel Beulshausen
4aa6ae493e PHPAPI-ize php_var_* functions
# need this for shm*
2001-07-01 20:18:51 +00:00
Sean Bright
55fecbab76 Remove unused variable. 2001-07-01 14:07:44 +00:00
Sean Bright
1b0356e0f7 Fix for bug #11796. Also, fixed a problem in get_meta_tags that required
NAME and CONTENT to be in that order.  Meta tags with no CONTENT attribute
are now added to the array as empty strings.  Meta tags with no NAME
attribute are ignored.
2001-06-30 20:07:12 +00:00
Zeev Suraski
f35b85b4c1 Fix bug #11678 2001-06-26 18:30:31 +00:00
Zeev Suraski
49d1e26143 Fix Win32 build 2001-06-26 13:33:24 +00:00
Hartmut Holzgraefe
045acafc52 @added optional suffix removal parameter to basename() (Hartmut)
added optional suffix removal parameter to basename()
this makes it more simmilar to the basename command
2001-06-23 00:51:03 +00:00
Sascha Schumann
6558ae6f21 dup fds before fdopen'ing them, so that people cannot deliberately
close stdio streams.

This needs to be tested on non-UNIX platforms.

PR: #11599, #8624
2001-06-22 07:07:48 +00:00
Thies C. Arntzen
bd4f32cf12 - fixed the reference in session thingie
- regression test checked (this time;-)
- added new regression test for references
- references _between_ session variables also work in when the session var
  replaces an already existing global var (this was a brain twister)
- saved one strlen call per session variable
- fixed one tiny leak
2001-06-21 18:46:26 +00:00
Sascha Schumann
d6d59a9ee5 1. st_blksize might be different for regular files and symlinks; hence
ignore differences in the twelfth element of the stat() array.

2. The 'test.file' is created by the script, thus the owner of the file
   is the user id executing the script.  A mode of 0654 does not grant
   the owner the right to execute the file and therefore, the correct
   output here is "not executable."
2001-06-21 11:15:38 +00:00
Colin Viebrock
a367c39c2e date('W') now returns week of year (ISO 8601) 2001-06-20 18:07:53 +00:00
Thies C. Arntzen
03ae0d775b add PLS_FETCH(); 2001-06-20 15:46:47 +00:00
Rasmus Lerdorf
94897efc36 Fix for #11570 2001-06-20 14:47:26 +00:00
Andi Gutmans
c977f29862 - Use ALLOC_HASHTABLE() instead of emalloc(sizeof(HashTable)) 2001-06-19 16:03:35 +00:00
Sebastian Bergmann
e4f109b69f Finish phpinfo() HTML 4.01 tweaking. 2001-06-19 15:21:28 +00:00
Sebastian Bergmann
615cf785c1 Fix crash bug in urlencode(). 2001-06-19 15:20:50 +00:00
Sebastian Bergmann
499334e498 Make output of phpinfo() compliant with HTML 4.01. 2001-06-15 18:34:09 +00:00
Stanislav Malyshev
5ad3d2828f Fix potential crash 2001-06-14 15:36:10 +00:00
Daniel Beulshausen
e4a2620d80 update credits 2001-06-14 10:05:41 +00:00
Zeev Suraski
1093ed17fb Clean-up
Remove a lot of 100% redundent code
2001-06-13 17:04:36 +00:00
Daniel Beulshausen
491fcd2ef8 used in extension(s) as well 2001-06-11 15:18:44 +00:00
Daniel Beulshausen
c6b4e55838 PHPAPIize url function to make them available to the outside (i.e. mbstring) 2001-06-11 15:14:04 +00:00
Daniel Beulshausen
cae817a520 move some constants to a more appropriate place 2001-06-11 14:46:44 +00:00
Rasmus Lerdorf
81af7edbd0 Blowfish detection patch from Alexander Bokovoy <ab@avilink.net> 2001-06-07 12:18:02 +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
foobar
fadd1472ea Fix bug: #9713 2001-06-04 02:04:46 +00:00
Andrei Zmievski
daefeb59d5 Kill warning. 2001-05-29 20:32:57 +00:00
Stanislav Malyshev
ca8c8264db Fix the reference serializer
# Hope now it is right...
2001-05-29 13:19:24 +00:00
Wez Furlong
8b5edf1a9e Fix compile warning 2001-05-29 10:14:46 +00:00
Wez Furlong
d38cba8697 Added charset awareness to htmlentities() and htmlspecialchars(); use an
optional third parameter to specify the charset; otherwise tries to determine
it from the LC_CTYPE locale setting.
2001-05-28 11:00:06 +00:00
Sterling Hughes
b2bd3b315f move to php_strtok_r() 2001-05-27 01:18:12 +00:00
Andi Gutmans
fe1dbf644f - Add prototype. 2001-05-24 12:54:05 +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
John Donagher
639b957f74 Add missing end-folding delimiter 2001-05-23 01:50:11 +00:00
Andi Gutmans
177934732b - Start nuking not needed GINIT 2001-05-22 19:19:04 +00:00
Jon Parise
311278f273 @ - Fix disk_free_space() and disk_total_space() under FreeBSD. (jon)
FreeBSD defines statfs(2) in <sys/mount.h>.  Teach PHP to look for it there.
2001-05-22 02:45: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
foobar
fcfbb0cce6 This looks better. 2001-05-20 01:31:53 +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
Rasmus Lerdorf
ae3dda8285 Fix bug #9526 2001-05-19 22:50:44 +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
Sascha Schumann
0255bb01e4 Files should be shared among processes. 2001-05-18 17:48:43 +00:00
foobar
ad366598a6 Fixed bugs: #10297, #10615, #10783, #10880 2001-05-16 04:50:49 +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
foobar
613aacf0b0 MFB 2001-05-15 02:05:33 +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
Derick Rethans
6123e2abe0 - Bumbed up the warning level to be in sync with fopen (which is E_WARNING
too) (See bug #10856)
2001-05-14 18:30:07 +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
Wez Furlong
615086c2c9 prototype for php_file_le_stream() 2001-05-12 21:49:13 +00:00
Wez Furlong
7a88deb402 expose streams to other extensions. 2001-05-12 21:48:39 +00:00
Sascha Schumann
afdaee9e47 Nuke more quotes 2001-05-12 11:09:05 +00:00
Jason Greene
c115a75544 Rewrote stat() and fstat() to be memory efficient, due to a recent
thread on php-dev.

Note: I added a macro that might have use in other instances, but for now
is included in php_filestat.h
2001-05-11 19:55:44 +00:00
Derick Rethans
04bd8d9174 Tabs please... 2001-05-11 13:34:49 +00:00
Sebastian Bergmann
e69f4dc51c Fix for bug #10815. 2001-05-11 13:32:10 +00:00
Jason Greene
7f3291ae8c Fix is_executable test. 2001-05-11 02:45:49 +00:00
Jason Greene
0ed93d71b2 @fstat() and stat() now return identical output by returning a numerical and
@string indexed array (Jason)

(Andrei's suggestion to still allow backwords compatibility.)
2001-05-11 01:47:46 +00:00
Andrei Zmievski
f071e8c566 Always free the callback_name when using zend_is_callable(). 2001-05-10 16:30:12 +00:00
Zeev Suraski
4c10e198e2 Fix buggy line split 2001-05-10 14:25:48 +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
ff11c36dc5 Avoid crashing if somehow, output is sent in a new thread tha had no requests 2001-05-07 22:00:13 +00:00
James Moore
f3342a5b55 Fix win32 build 2001-05-06 19:20:25 +00:00
Derick Rethans
9f5e71bd42 - Nuke warning 2001-05-06 18:53:45 +00:00
Derick Rethans
b181237582 - Partial fix for bug #9050, support for "Jan 19 2000" date format 2001-05-06 18:33:49 +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
foobar
9d1817ed7f Fix bug: #10323. Every value outputted is now escaped. 2001-05-06 15:20:56 +00:00
Wez Furlong
4f943b6012 Fixed win32 build problem. 2001-05-06 09:39:11 +00:00
Wez Furlong
3ffb8e3800 Nuke buffering from php_streams, move connect_nonb() from fsock.c to network.c
and rename to php_connect_nonb().
Use php_connect_nonb() instead of connect() in php_hostconnect() -> timeouts
should now work in php_hostconnect().
sock streams abstraction now uses php_sockbuf as the "abstract" pointer.
2001-05-05 18:36:22 +00:00
Sebastian Bergmann
d92522c8d1 Nuke unreferenced local variables. 2001-05-04 06:25:10 +00:00
Derick Rethans
8909c33319 - Applied a patch that enables getimagesize to return the size of .bmp and
.psd files (Patch by Paul Jongsma <paulj@webtic.com>)
@- Added support to getimagesize to return dimensions of BMP and PSD
@  files (Derick)
2001-05-03 21:28:26 +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
Andi Gutmans
91451bfcaf - Remove leak from opendir() under Windows. Maybe readdir.c should be
changed to use emalloc()
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 18:06:56 +00:00
Andi Gutmans
21603118b1 - Fix bug Bug id #5987. It could be fixed by changing readdir.c but I
- prefered not to touch that code but to treat windows a bit differently
- in dir.c
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 17:57:23 +00:00
Derick Rethans
b8ad2e842d - 'Fix' for bug #10145 2001-04-29 15:48:07 +00:00
Sean Bright
a98c9ba66f Fix proto decription. 2001-04-29 13:30:56 +00:00
Sean Bright
596e8208be Really fix bug #10362.
# My previous fix caused a segfault when there were parens in an unallowed
# tag :(  Thanks Andi.
2001-04-29 13:16:05 +00:00
Sean Bright
9e34117cd9 Fix for bug #10362 2001-04-28 23:07:51 +00:00
Sean Bright
4175151567 - Fix for bugs #9042, #8212, and #8962. Patch from <tunacat@yahoo.com>
- Fixed proto for exec()
2001-04-28 13:16:18 +00:00
Sterling Hughes
1865be6ca4 fix for bug #8994, courtesy tom.anheyer@berlinonline.de
# Are we having another RC, and if so, can I MFH in time for it?
2001-04-26 13:47:17 +00:00
Rasmus Lerdorf
e8e6828863 - Make the printf functions binary clean
@ - Make the printf family of functions binary clean
2001-04-25 21:05:59 +00:00
Andrei Zmievski
07a5e3fb9c * Made ENT_* defines availabe to other functions.
* The key/variable names in WDDX are now html escaped to not break XML.
@- Fixed WDDX serialization to HTML-escape key/variable names so as not to
@  break the XML packet. (Andrei)
2001-04-25 20:14:29 +00:00
Andi Gutmans
ef1835f54f - Fix filetype() and lstat() too. 2001-04-25 06:30:24 +00:00
Andi Gutmans
ef71855bc6 - Another fix 2001-04-25 05:53:45 +00:00
Andi Gutmans
502b4efb7d - Nuke warning. This signed/unsigned stuff gets really annoying sometimes. 2001-04-25 05:43:30 +00:00
Andi Gutmans
76860d4fc0 - Fix problem with is_link(), there seem to be at least another couple of
- bugs lurking around though.
- Cleaned up code a bit and optimized it a bit too.
2001-04-25 04:22:29 +00:00
Stig Bakken
2cf1b8d345 * expanded the following constants and made them available in PHP:
DEFAULT_INCLUDE_PATH
  PEAR_INSTALL_DIR
  PHP_EXTENSION_DIR
  PHP_BINDIR
  PHP_LIBDIR
  PHP_DATADIR
  PHP_SYSCONFDIR
  PHP_LOCALSTATEDIR
  PHP_CONFIG_FILE_PATH
* no longer generating pear/PEAR.php
* fixed some tests
* some more installer work
2001-04-22 01:09:14 +00:00
foobar
d9b2f7910e ws pollution removed. 2001-04-20 15:37:55 +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
Alexander Feldman
f0abfcc894 Fixed typo. 2001-04-15 19:03:12 +00:00
Alexander Feldman
531b8042ad We shoud not fseek in a pipe and this caused a problem with popen and
fgets on the platforms where the buffer fix was applied (Solaris, FreeBSD).
Now the fseek is done only when the handle is of type fopen.
2001-04-15 18:42:50 +00:00
Thies C. Arntzen
9a42a31ba4 @- Fixed crash in pathinfo() 2001-04-13 18:22:13 +00:00
Sean Bright
b936138fd3 Constand should be case sensitive.
# Thanks Sterling
2001-04-09 21:12:54 +00:00
Jon Parise
5464d29551 Fix whitespace (use tabs). 2001-04-09 21:08:47 +00:00
Sean Bright
ec6f1887f8 Stop SIGSEGV on Apache startup. Patch from <adam@indexdata.dk> 2001-04-09 20:56:49 +00:00
Rasmus Lerdorf
334cba47b9 printf argnum (parameter swapping) support from Morten Poulsen 2001-04-09 15:44:24 +00:00
Stig Bakken
368c6bf003 @Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows) (Stig) 2001-04-08 21:57:13 +00:00
foobar
176f5847be ws pollution removed. 2001-04-07 21:46:43 +00:00
André Langhorst
9762f64222 fix proto 2001-04-07 15:43:06 +00:00
foobar
62c517d124 spaces to tabs 2001-04-05 18:48:03 +00:00
foobar
c34d2b91da Added new configuration directives:
arg_separator.input and arg_separator.output
2001-04-04 20:46:26 +00:00
foobar
83b5a2fb0c SCO (and maybe others) do not have this defined. 2001-04-03 10:51:16 +00:00
Anil Madhavapeddy
d26ec12ba2 Free the correct output buffer, to avoid a segfault on a HEAD request
when using output buffering with a custom handler (patch by zeev@)
2001-04-02 16:45:27 +00:00
James Moore
e52ec10341 remove rogue ZEND_GET_MODULE() 2001-04-02 16:37:50 +00:00
Andrei Zmievski
221a5a60b6 Use correct string length. 2001-04-02 13:20:16 +00:00
Zeev Suraski
b865380edb Fix headers handling with output buffering 2001-03-31 22:53:19 +00:00
André Langhorst
7d50e21a4b fix typo 2001-03-28 20:08:49 +00:00
André Langhorst
339ac67ce3 fix proto 2001-03-28 19:41:38 +00:00
Derick Rethans
c713967de3 - 'Fix' for bug 10002 2001-03-27 17:21:45 +00:00
Sascha Schumann
fa068b5297 Fix ZTS build 2001-03-24 01:08:13 +00:00