Commit Graph

3180 Commits

Author SHA1 Message Date
Sara Golemon
a65564f0fa User shouldn't have to initialize this pass-by-ref parameter 2003-04-04 20:43:36 +00:00
Wez Furlong
0148c0cb02 Simplify and enhance readability. 2003-04-04 08:57:40 +00:00
Sara Golemon
b2d4514580 Added stream_get_transports() 2003-04-04 05:21:03 +00:00
Sara Golemon
465bb61357 Kludgy fix for floating point drift causing problems like range(1.0,1.5,0.1) == array(1.0,1.1,1.2,1.3,1.4); 2003-04-03 18:33:05 +00:00
Sascha Schumann
7e7bbb751e Prevent entering of anything but arrays/strings in register_shutdown_func
Noticed by: Jan Schneider
2003-04-03 18:09:41 +00:00
Derick Rethans
6412e65bf9 - CS 2003-04-03 06:21:59 +00:00
foobar
16da825c7c CS fix 2003-04-03 01:12:47 +00:00
Rasmus Lerdorf
066a68d7fa MFB: Fix unregister_tick_function crash 2003-04-02 23:11:31 +00:00
Rasmus Lerdorf
1612ffad05 MFB: Fix the setlocale() segfault 2003-04-02 21:33:02 +00:00
Colin Viebrock
4888473efa fixes for logo guid functions 2003-04-02 16:51:40 +00:00
Sara Golemon
c249c67178 New test for userfilters rewrite 2003-04-02 00:41:09 +00:00
Ilia Alshanetsky
aab9718253 Fixed possible integer overflow in str_repeat(). 2003-04-02 00:25:45 +00:00
Rasmus Lerdorf
4b343a0562 MFB 2003-04-01 21:47:21 +00:00
Moriyoshi Koizumi
6301bd9b95 Fixed bogus test 2003-04-01 19:47:33 +00:00
Moriyoshi Koizumi
b302824171 Added a test case for bug #22538 2003-04-01 19:10:04 +00:00
Moshe Doron
3c982dea22 oops 2003-04-01 12:54:35 +00:00
Moshe Doron
d8b5687925 revert due the last string.c revert 2003-04-01 12:53:44 +00:00
Moshe Doron
31bd24860c revert last commit for now 2003-04-01 12:46:01 +00:00
Thies C. Arntzen
60214a0338 *** empty log message *** 2003-04-01 11:04:38 +00:00
Sascha Schumann
cc39646730 Fix segfault in register_shutdown_function 2003-04-01 10:02:29 +00:00
Sara Golemon
48c947389e Bug #22962 2003-04-01 06:21:54 +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
Moriyoshi Koizumi
93386a8b09 oops 2003-03-31 23:49:53 +00:00
Moriyoshi Koizumi
e8f13586a7 Fixed test; in ZE2, all the properties used in any methods are populated
at compile time.
2003-03-31 22:54:18 +00:00
Moshe Doron
64bd1cdbd6 # make derik happy 2003-03-31 19:01:43 +00:00
Moshe Doron
dc8daad70d fix for 22904
@ now addslashes() do it also on cybase magic mode(moshe).
2003-03-31 18:56:41 +00:00
Moshe Doron
5c3a073c07 # unnecessary condition here. 2003-03-31 12:08:31 +00:00
Sascha Schumann
0481896ff7 TS issue, noticed by Sebastian Bergmann 2003-03-31 05:39:25 +00:00
Sascha Schumann
cb3c506639 Ensure that the seed function has been called, even if we are used by
another module's request init function.

Noticed by: marcus.boerger@t-online.de
2003-03-31 03:24:18 +00:00
Moriyoshi Koizumi
47e40e1b98 Improved var_dump() and debug_zval_dump() so they also show the
namespace of the given object.
2003-03-29 21:29:22 +00:00
Ilia Alshanetsky
0e73275429 CS 2003-03-28 14:31:31 +00:00
David Hill
60a7aef6e9 Changing parsedate to be reentrant using pure_parser (Dave) 2003-03-28 13:10:52 +00:00
Ilia Alshanetsky
3db5278dcc CS 2003-03-27 18:57:53 +00:00
David Hill
86569cb154 Backing out part of TZ change 2003-03-27 14:23:48 +00:00
David Hill
1fa7504fae Changing TZ to match Unix98 standard to make Tru64 happy 2003-03-26 16:42:03 +00:00
Sebastian Bergmann
5ca078779a Eliminate some TSRMLS_FETCH() calls. Tested with Win32 build of SAPI/CGI and SAPI/CLI on Win32. 2003-03-25 08:07:13 +00:00
Moriyoshi Koizumi
570e929d49 Fixed bug #22834 (compile failure due to ugly implicit casts) 2003-03-24 21:22:23 +00:00
Moriyoshi Koizumi
03a5129429 oops... 2003-03-24 19:24:35 +00:00
Moriyoshi Koizumi
68b03bde3a Added test cases for new functionality 2003-03-24 19:21:20 +00:00
Moriyoshi Koizumi
93b250f923 Added koi8-r, cp866, and cp1251 support for htmlentities 2003-03-24 19:13:02 +00:00
Alex Waugh
d403ed4bc3 Fix linkage of symbols. 2003-03-23 21:58:03 +00:00
Shane Caraveo
456b6cbeab The environment should *never* be magic quoted. 2003-03-23 19:30:31 +00:00
Sterling Hughes
0a4282eabf fix segfault in file_set_contents() when the file could not successfully
be opened.
2003-03-21 22:22:15 +00:00
Wez Furlong
0fd995f9fc Add the mode string that was used to open the stream to the meta data,
as requested by Philip Olson.
2003-03-18 23:45:27 +00:00
Wez Furlong
86fb577d59 Implement persistent plain file streams.
Usage:

php_stream *stream = php_stream_fopen("/path/to/file", "r+b", NULL,
	STREAM_OPEN_PERSISTENT | ENFORCE_SAFE_MODE | REPORT_ERRORS);

the filename and mode are combined to form the hash key for the persistent
list; they must be identical for this same stream to be returned again in the
next request.

Calling php_stream_close() on a persistent stream *will* close it, as is
usual with all persistent resources in PHP/ZE.

This is deliberately *not* exposed to user-space PHP at this time.
2003-03-18 23:37:54 +00:00
Jay Smith
c0d1508ec8 get_browser() needs to use zend_is_auto_global() on _SERVER. 2003-03-18 21:49:01 +00:00
Marcus Boerger
3e621fac94 make phpinfo() depend on executed sapi 2003-03-18 20:52:52 +00:00
Wez Furlong
ce01fd9526 Avoid using FILE* where possible.
Tidy up handling of potential error situations for the php:// wrapper.
2003-03-18 16:40:29 +00:00
Wez Furlong
862586e376 CS fixes 2003-03-18 14:35:15 +00:00
Stig Bakken
0e6fca4f22 * email address change 2003-03-18 12:06:09 +00:00
Hartmut Holzgraefe
dbe4f2238c proto fixes 2003-03-17 13:11:19 +00:00
Sascha Schumann
d0debaf45c Merge macro changes 2003-03-16 23:02:19 +00:00
Jay Smith
830b14297f @- Fixed bug #22386 (Using browscap causes segfault). This fix
@  also adds an optional bool argument to get_browser() that
@  makes the return value an array instead of an object. (jay)
2003-03-14 17:54:38 +00:00
Jay Smith
39ec83bb5f Solaris knows nothing of "Europe/Amsterdam". Use "US/Eastern" instead. 2003-03-13 18:51:39 +00:00
Sterling Hughes
39b8f06f9b @ Add the file_set_contents() function, as a complement to the file_get_contents()
@ function. (Sterling)
2003-03-12 06:47:34 +00:00
Sascha Schumann
65b9a40640 fix sizeof(size_t) > sizeof(uint) issue 2003-03-11 02:28:46 +00:00
Sascha Schumann
dfb0d70b5b reverting jani's non-sense commits 2003-03-11 01:47:06 +00:00
foobar
febb535db0 touch 2003-03-10 22:59:46 +00:00
foobar
7a1ecedf85 64bit issue fixed 2003-03-10 22:59:34 +00:00
Moriyoshi Koizumi
a41e0c1382 Modified the test to reflect the recent change on var_dump() 2003-03-10 20:46:39 +00:00
David Hill
a7b84ac7cb Correcting int/long mismatched - 64bit issues. 2003-03-10 20:30:33 +00:00
Andrei Zmievski
b1546a1775 Print the object handle (it's useful). 2003-03-10 15:13:32 +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
Derick Rethans
0d603b2d9a - Fix proto 2003-03-09 00:05:48 +00:00
Stefan Esser
1f54605723 wrong place. 2003-03-08 14:51:16 +00:00
Stefan Esser
76c427fd05 fixing memory leak 2003-03-08 14:37:01 +00:00
foobar
3c9155e0cb Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
David Hill
5c90216d2c 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Stefan Esser
af4aa97d1e Fixing functionicalls with variable number of parameters... 2003-03-06 20:31:20 +00:00
Moriyoshi Koizumi
9bdc86973b Fixed a small leak in the convert filter code 2003-03-05 17:51:33 +00:00
Ilia Alshanetsky
53530765ff Added support for http redirects to ftp.
Fixed bug #22508 (Added protection against circular HTML redirects).
2003-03-04 16:04:05 +00:00
Ilia Alshanetsky
b162e18a29 Skip test if running under safe-mode. 2003-03-04 14:37:38 +00:00
Edin Kadribasic
d1feae01d9 Credits update. 2003-03-04 00:10:11 +00:00
Zeev Suraski
622da33231 - Optimize $_REQUEST
- Fix phpinfo()
2003-03-02 13:35:01 +00:00
Moriyoshi Koizumi
da0d5a11ed Fixed my silly mistake in the filter code 2003-03-02 08:39:01 +00:00
Wez Furlong
558db0d87a Expose php_stream_copy_to_stream as stream_copy_to_stream(); a high
performance alternative to looping reads and writes.
2003-03-01 01:27:50 +00:00
Wez Furlong
349ce76f96 Tidy up stupid signed/unsigned issues with win32 by introducing a php_socket_t typedef. 2003-02-28 21:03:36 +00:00
Wez Furlong
68c1294462 Add this file... 2003-02-28 20:06:05 +00:00
Wez Furlong
1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
Ilia Alshanetsky
14bf872003 Fixed compiler warnings. 2003-02-28 17:26:28 +00:00
Hartmut Holzgraefe
050e86fde4 it is still to early in the morning for coding :( 2003-02-28 07:57:00 +00:00
Hartmut Holzgraefe
80d267e271 make sure that GNU extensions exist for fnmatch() 2003-02-28 07:52:23 +00:00
Ilia Alshanetsky
912bef379d Fixed compiler warning. 2003-02-27 23:53:55 +00:00
Wez Furlong
0cec0bd8a9 streams.c -> streamsfuncs.c
# argh!
2003-02-27 22:48:13 +00:00
Wez Furlong
493ef36299 Update win32 build.
Since msvc sucks, I had to rename ext/standard/streams.c to ext/standed/streamsfuncs.c
2003-02-27 22:43:51 +00:00
Wez Furlong
5def83df0b Move streams specific stuff from ext/standard/file.c -> ext/standard/streams.c
Move win32 select implementation into win32/.
Will update win32 build in a moment.
2003-02-27 22:23:39 +00:00
Ilia Alshanetsky
ea1f34e892 Fixed a bug that would cause filetype() to return "unknown" for
non-existent files on Win32.
2003-02-27 20:38:00 +00:00
Wez Furlong
cfd8150b30 Add a generic meta data api for streams. 2003-02-27 19:10:24 +00:00
Wez Furlong
76ebaa6ee7 - Move https:// and ftps:// wrapper registration into the openssl module.
- Expose the http:// and ftp:// wrappers as PHPAPI
- Remove unused variables
2003-02-27 18:16:35 +00:00
Wez Furlong
fd61f69077 Another big commit (tm).
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
  some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
  (currently only supports OpenSSL, but could support other SSL toolkits,
  and other crypto transport protocols).

Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
  removing the link-time requirement for ssl:// and https:// sockets and
  streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
  there are now a range of possible socket-type streams.

Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.

# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Ilia Alshanetsky
560e33968d Fixed bug #21410 (fixed handling of NULL or "" files on Win32) 2003-02-27 16:41:23 +00:00
Ilia Alshanetsky
695ae92c97 1) Make the output of system() binary safe
2) Solved a memory leak when the return_value variable passed by reference is
   not an integer in system()/exec()/passthru().
3) Solved a bug in exec(), which would make it append to the 2nd parameter
   (passed by reference) if the parameter is an array instead of overwriting it.
4) Changed the code to use the streams code, resulting in a smaller code base.
5) Various cleanups resulting in reduction of overall code base inside the file
   by ~ 1/3.
6) Speed improvements of ~2.5 times compared to previous performance (based on
   attached PHP script).
2003-02-26 22:11:12 +00:00
Derick Rethans
424c41a72e - Added an extra ini setting with which extra commands can be forced to
the sendmail deamon on a per-vhost base. The value in this ini setting
  will override all extra commands passed as the 5th parameter to mail()
  and will work in Safe Mode.
@- Added an extra ini setting (mail_force_extra_paramaters) which forces
@  the addition of the specified parameters to be passed as extra
@  parameters to the sendmail binary. These parameters will always replace
@  the value of the 5th parameter to mail(), even in safe mode. (Derick)
2003-02-26 20:04:16 +00:00
Derick Rethans
17acc55ad0 - Fix proto 2003-02-26 19:34:16 +00:00
Derick Rethans
bc11c47ce6 - Whitespace 2003-02-26 19:25:24 +00:00
Ilia Alshanetsky
aee0c18bde Made shell_exec() use streams, this simplifies the code and in some cases
makes it a little faster too.
2003-02-25 23:52:34 +00:00
Ilia Alshanetsky
bce8bfdae4 MFH (forgot to put this fix into the 5.X tree). 2003-02-25 23:39:57 +00:00
Moriyoshi Koizumi
991da29849 Set fgetss() free from the length parameter 2003-02-25 20:12:18 +00:00
Ilia Alshanetsky
503e49feae Fixed test. 2003-02-25 16:27:51 +00:00