Commit Graph

2625 Commits

Author SHA1 Message Date
Wez Furlong
5cf5248b00 Fix for mips compiler. 2003-07-14 19:38:13 +00:00
foobar
253dc38445 Fixed bug #24563 (preg_match() crashes PHP under Apache2) 2003-07-10 16:08:56 +00:00
Wez Furlong
fa342d2404 MFB: binary mode by default under win32. 2003-07-05 08:25:25 +00:00
Sterling Hughes
9a29929029 avoid external conflicts in apache 2003-07-04 18:19:02 +00:00
Moriyoshi Koizumi
fd9d9dea1c Fix build 2003-07-03 15:26:12 +00:00
foobar
50d3650a92 Cut the long line a bit for readability.. 2003-07-03 02:59:04 +00:00
Ilia Alshanetsky
a96aa89ae3 Compiler warning fix. 2003-07-03 00:55:20 +00:00
Sara Golemon
444615e74c Introduce connection pooling API. I'll use these in http/ftp fopen wrappers soon. 2003-07-02 22:18:59 +00:00
Wez Furlong
49228bd5e2 more size_t -> socklen_t.
Noticed by tychay@php.net
2003-07-02 21:11:35 +00:00
Wez Furlong
989500b347 socklen_t needs this.
We might need some more magic to ensure that socklen_t gets defined in
the correct places; lets see if any more problems arise...
2003-07-02 01:35:39 +00:00
Wez Furlong
17cbf83404 size_t -> socklen_t
fixes warnings under macosx
2003-07-01 19:51:06 +00:00
Ilia Alshanetsky
8cb5c9c6ba Fixed bug #24063 (*printf() did not handle scientific notation correctly) 2003-06-30 01:03:21 +00:00
Rui Hirokawa
2b44c63d50 Fixed corruption of multibyte character including 0x5c as second
byte in multipart/form-data.
2003-06-28 23:37:18 +00:00
Wez Furlong
5ecc91c27d Merge selectable descriptor casting from PHP_4_3 branch. 2003-06-28 11:24:47 +00:00
Wez Furlong
8dfe385215 Merge getaddrinfo() tidy-up from PHP_4_3 branch. 2003-06-28 11:12:48 +00:00
Wez Furlong
c0c20ef6f6 Fix for mips compiler 2003-06-28 11:06:11 +00:00
Edin Kadribasic
2e9c9427ec Move along, nothing to see. 2003-06-27 22:18:06 +00:00
Sterling Hughes
1135af7340 beta 1 2003-06-27 22:09:12 +00:00
Sebastian Bergmann
f8af9c3cee MFB: libpcre 4.X needs POSIX_MALLOC_THRESHOLD to be defined. 2003-06-27 16:43:05 +00:00
foobar
3a7ca909be - HAVE_OPENSSL_EXT is not defined always. 2003-06-27 16:41:41 +00:00
Sara Golemon
2e4ef86e10 MFB
Plug leak in context notifiers, implement notifier->dtor
2003-06-27 16:23:58 +00:00
Edin Kadribasic
94b7050bc0 Enabled sqlite by default on Windows.
# Also added iconv.lib to the build since it is a dependency of
# the precompiled libxml. This will be removed later.
2003-06-27 14:32:59 +00:00
Sascha Schumann
9979003eeb undefine macros before defining them 2003-06-27 07:43:42 +00:00
Sara Golemon
ac79577776 MFB PHP_4_3 main/streams.c r-1.125.2.70 2003-06-27 04:27:18 +00:00
Zeev Suraski
daae086380 New logo (not final yet...) 2003-06-26 17:30:41 +00:00
Sebastian Bergmann
1c6c9e9485 Sync. 2003-06-26 15:15:02 +00:00
Sebastian Bergmann
4434c8e0d6 Add ext/dom and ext/simplexml to the Win32 default build. #Apart from a linker error when HAVE_SIMPLEXML=1 is set this already works. More research, after a good night's sleep, is required ;-) 2003-06-25 21:37:50 +00:00
Sebastian Bergmann
926bd5cf29 Disable MySQL extension by default. 2003-06-25 05:01:50 +00:00
Sebastian Bergmann
a10e5b6381 Remove ext/rpc references from Windows build. 2003-06-25 04:54:23 +00:00
Ilia Alshanetsky
419448238b Fixed typo. 2003-06-24 14:36:01 +00:00
Ilia Alshanetsky
6b5b6079da Fix for bug #24313 (port from dead PHP_5 branch) 2003-06-24 13:56:25 +00:00
Ilia Alshanetsky
caef4c7776 Handle numeric keys passed via GPC 2003-06-17 17:15:02 +00:00
Ilia Alshanetsky
e40142047b Fixed bug #24208 2003-06-16 19:24:56 +00:00
Sara Golemon
730ce7b06f Add context property to userspace streams object. 2003-06-16 19:13:39 +00:00
Sara Golemon
2f4e91bf8a optionvalue is being copied via zval_copy_ctor, there's no need to addref the original 2003-06-16 18:19:14 +00:00
Edin Kadribasic
6e2743023b Win32 build fixes for openssl 2003-06-15 23:34:46 +00:00
Marcus Boerger
f304458bdb Fix ZTS mode (hopefully all is working fine now again) 2003-06-14 19:30:42 +00:00
Ilia Alshanetsky
93a5238465 Fixed bug #24007 (Problem with register_globals & arrays) 2003-06-14 15:08:27 +00:00
Sara Golemon
99db19661a Plug leak (context options not freed)
Make contexts auto-registered, ensures userland contexts
and C API contexts are both dealt with on request shutdown.
Also brings contexts in keeping with streams which are already
auto-registered.
2003-06-13 21:33:59 +00:00
Derick Rethans
5b1f7be3eb - MFB: HTTP Request Methods are case sensitive
#- This was surrounded by an #ifdef, but I thought I fixed it too.
2003-06-12 08:38:58 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Edin Kadribasic
f7c9551d5e MFB 2003-06-09 01:00:23 +00:00
Zeev Suraski
ce40bc9073 Make $_FILES auto global (bug #23680) 2003-06-08 15:30:33 +00:00
Edin Kadribasic
b7713f411e Fix for #23902 by Shane.
Removed bogus recommendation from php.ini files.

# Basic authentication is actually possible
# usign IIS + PHP cgi countrary to our current docs
2003-06-03 10:06:45 +00:00
foobar
d5253b4f1f Follow the "standard" naming. 2003-05-30 20:03:10 +00:00
Hartmut Holzgraefe
ac2606bf58 fix for crashbug with user level wrapper implementations of stream_stat 2003-05-29 20:19:03 +00:00
Sebastian Bergmann
d1cb228bf1 Get rid of references to expat in MSVC project files. For now this expects libxml2 (library and includes) in one of the MSVC default include/library directories. Right now it doesn't link, dunno why -- working on it. 2003-05-24 08:03:38 +00:00
Sara Golemon
dccf33b4e8 MFB(r-1.122.2.10)
Bug#23765 File upload handler should not care about case sensitivity of header values.
2003-05-23 21:40:45 +00:00
Ilia Alshanetsky
5298fd6256 MFB 2003-05-21 22:56:59 +00:00
Wez Furlong
2d1a6e5dc2 MFB context refcounting and text-mode fopen fixes 2003-05-21 13:33:55 +00:00
Sara Golemon
83b7b75c3c Implement default contexts. For the moment this is useless
but it will be used soon for connection pooling.
2003-05-21 04:04:50 +00:00
Hartmut Holzgraefe
b5bef8f7b3 always return timestamps as 'atime', 'mtime' and 'ctime'
no matter what names the underlying platform uses for them
2003-05-20 13:09:11 +00:00
Wez Furlong
192f632e2e MFB fix for persistent streams recycling. 2003-05-19 22:58:34 +00:00
Marcus Boerger
f10a7b90b2 Fix warning 2003-05-19 18:48:15 +00:00
Marcus Boerger
1b0fdbf63a Fix memleaks 2003-05-19 18:46:59 +00:00
Sebastian Bergmann
88cb80020a First try at getting the Windows build working again after libxml2 got unbundled. 2003-05-19 16:28:08 +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
Stanislav Malyshev
605eb159e0 Bump API version - HEAD is no longer binary compatible
to 4.3 branch due to changes in globals, etc.
2003-05-18 10:22:50 +00:00
Frank M. Kromann
941d4c3e99 Fix compilation under Win32 2003-05-17 22:15:39 +00:00
Wez Furlong
84fc3f384a Fix segfault 2003-05-17 09:34:37 +00:00
Sebastian Bergmann
85a13e3e9a Fix warnings. 2003-05-17 06:21:34 +00:00
Wez Furlong
e9b62698c7 Stronger validation of ob_start() parameters. 2003-05-16 19:08:13 +00:00
Sara Golemon
44743cf9ec Implement userspace wrapper support for unlink method 2003-05-14 18:30:49 +00:00
Sara Golemon
65d359d71a Fold 'options' parameter into wops->unlink method 2003-05-14 15:12:07 +00:00
Sara Golemon
5126fbe556 Setup unlink() method in wrapper_ops structure, implement unlink in plainfiles wrapper, explicitly set method NULL in other wrappers (for now), and rewrite unlink userland function to call into wrapper_ops 2003-05-14 06:10:04 +00:00
Ilia Alshanetsky
b76261dcbb Fixed bug #23454 (_REQUEST did not handle arrays with same names from
different sources correctly).
2003-05-13 22:08:48 +00:00
Sascha Schumann
2c7c0457b6 Ensure that open(".", 0); works, otherwise bail out 2003-05-13 18:48:01 +00:00
Sascha Schumann
af402a9e13 MFB don't close random fds 2003-05-13 02:26:42 +00:00
Ilia Alshanetsky
56ba9b4ae5 emalloc -> safe_emalloc 2003-05-13 01:57:54 +00:00
Ilia Alshanetsky
b20df54af7 Make serialize precision a configurable option. 2003-05-08 01:23:21 +00:00
Marcus Boerger
3fc4a32743 Infrastructure to catch warnings and throw tehm as errors autmatically 2003-05-07 01:02:23 +00:00
Sebastian Bergmann
4c8e30eccc MFB: Fix for bug #23489. 2003-05-06 04:22:01 +00:00
Ilia Alshanetsky
4f4cc4f7a3 Sanity check that ensures proper handling of 'E' doubles/floats as well as
prevents an unlikely buffer overflow.
2003-05-05 19:54:28 +00:00
foobar
1948b45b3f Make use of --with-exec-dir for real.. 2003-04-28 21:00:32 +00:00
foobar
f140ae993f fix compiler warning (unused variable) 2003-04-25 18:11:32 +00:00
foobar
2219a62606 - Made 'register_long_arrays' to be "On" by default. 2003-04-25 10:57:23 +00:00
Sascha Schumann
652b615438 Fix PUTS/PUTS_H to only evaluate their argument once. 2003-04-19 18:35:31 +00:00
Sara Golemon
0c366c24e5 Macro: php_stream_get_from_zval(php_stream *stream, zval **zstream, char *mode, int options, char **opened_path, php_stream_context *context) Z_TYPE_PP(zstream) can be either IS_RESOURCE (An already opened stream) or IS_STRING (a path to a stream to be opened) 2003-04-17 00:00:34 +00:00
Marcus Boerger
b09aa87120 Don't access what is already freed (noticed by Sascha) 2003-04-16 17:30:03 +00:00
Moriyoshi Koizumi
49b43ad115 Changed stream filter factory to be capable of accepting a zval as a parameter
instead of a string
2003-04-16 14:30:25 +00:00
Sascha Schumann
bb50c3846f Fix uninitialized reads
==32323== Conditional jump or move depends on uninitialised value(s)
==32323==    at 0x80F5A5C: zend_ini_color_displayer_cb (/home/sas/src/php4/Zend/zend_ini.c:374)
==32323==    by 0x80C5B7F: php_ini_displayer_cb (/home/sas/src/php4/main/php_ini.c:60)
==32323==    by 0x80C5D15: php_ini_displayer (/home/sas/src/php4/main/php_ini.c:115)
==32323==    by 0x80F0168: zend_hash_apply_with_argument (/home/sas/src/php4/Zend/zend_hash.c:707)
2003-04-16 12:44:08 +00:00
Marcus Boerger
75c8f37c03 Make it static 2003-04-13 20:30:57 +00:00
Marcus Boerger
887d5ec9c1 Speling 2003-04-13 20:12:54 +00:00
Marcus Boerger
bff63db577 Fix persistent stream closing (that one took me at least 3 days) 2003-04-13 19:47:55 +00:00
Wez Furlong
2090d23f02 Fix for #23069 (Windows sets readonly mode for temporary files in tempnam) 2003-04-11 11:08:44 +00:00
Andrei Zmievski
2154cddd0e Move memnstr into Zend and make an alias for BC in PHP. 2003-04-08 15:04:26 +00:00
Sara Golemon
d6c24de842 Add IPv6 support to stream_socket_client/server() 2003-04-05 02:42:12 +00:00
Andrei Zmievski
81482833b5 Introduce ZEND_ME() and ZEND_METHOD() macros. Use these for declaring
class methods to avoid name collisions.
2003-04-04 15:38:20 +00:00
Sascha Schumann
7f5a42da17 Backout Jani's commit to resync branches 2003-04-04 08:40:48 +00:00
Sara Golemon
c985b780a5 Prevent php_stream_get_record from grabbing more than maxlen characters 2003-04-04 01:34:00 +00:00
foobar
ff22d581d9 WS & CS fix 2003-04-03 18:44:00 +00:00
Sascha Schumann
7e2fcf986e Add some checks and avoid passing invalid data to call_user_function_ex.
Fixes some heap corruption and allocation of negative amounts of memory.
2003-04-03 18:19:15 +00:00
Moriyoshi Koizumi
f7a8499806 Fixed memleak in output buffering facility 2003-04-03 00:50:17 +00:00
Colin Viebrock
a77cb3c35d oops ... committed the wrong one 2003-04-02 16:28:38 +00:00
Colin Viebrock
6aa1481f83 fix logo (outline around letters) 2003-04-02 15:36:34 +00:00
Sascha Schumann
e2333fd1df Fix an uninitialized read, default to FAILURE 2003-04-01 19:14:47 +00:00
Moriyoshi Koizumi
8d2dd87d89 Fixed bug #22538 (stream filter problem) 2003-03-31 23:22:10 +00:00
Ilia Alshanetsky
62909237c4 WS 2003-03-31 22:13:01 +00:00
Marcus Boerger
0235d331b7 use the correct macro - noticed by Andrei 2003-03-31 19:14:18 +00:00
Marcus Boerger
7a76d5f438 cleanup 2003-03-30 13:59:05 +00:00
Shane Caraveo
0f3a0dfa52 _SERVER also should not be quoted by magic_quotes_GPC
also remove an empty if statement
2003-03-30 01:06:54 +00:00
Marcus Boerger
b5c97d8dab fix phpinfo() & php -i 2003-03-29 21:25:03 +00:00
Moriyoshi Koizumi
e1eb238cf2 On 64bit platforms, pointers are 64bit long.. 2003-03-28 17:09:04 +00:00
Moriyoshi Koizumi
961ad8e24a Improved php_import_environment_variables: avoid emalloc()ing in most cases 2003-03-27 21:13:47 +00:00
Sterling Hughes
84f0dd0e44 really fix 2003-03-26 23:03:48 +00:00
Sterling Hughes
c0f04cc087 fix segfault 2003-03-26 23:01:39 +00:00
Sebastian Bergmann
3fc852824f Eliminate TSRMLS_FETCH() calls in destroy_op_array() and zend_get_class_entry(). 2003-03-26 07:44:11 +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
Shane Caraveo
456b6cbeab The environment should *never* be magic quoted. 2003-03-23 19:30:31 +00:00
Shane Caraveo
26296130ad Fix PHPRC overriding other ini files. This is how PHPRC worked prior to
4.3.x, and is usefull for applications that execute PHP and want to
emulate CGI and define alternate INI files (ie. cannot use -c).
2003-03-22 18:54:35 +00:00
Wez Furlong
e451d88399 Fix for persistent stream shutdown under debug builds 2003-03-20 01:23:04 +00:00
foobar
88fe9c2d3c Fixed bug #22775 (Fatal errors exit with status 0 with CGI/CLI) 2003-03-19 08:22:12 +00:00
Wez Furlong
7379f47518 Sanity check for when a stream is requested to be persistent but the wrapper
does not respect the flag.
2003-03-19 00:17:15 +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
Wez Furlong
6a87651006 Q} 2003-03-18 22:26:02 +00:00
Marcus Boerger
4529fb344c -turn html_errors on by default again
-disbale clickable error messages by docref_root default to ''
2003-03-18 22:21:54 +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
Marcus Boerger
63739c7db8 give sapi modules the possibility to overwrite default ini settings 2003-03-18 15:53:33 +00:00
Wez Furlong
267db80b21 avoid unsigned issues. 2003-03-18 15:15:10 +00:00
Wez Furlong
7c2ccb5f65 Fix for #22721 (poor file() performance on systems without mmap) 2003-03-18 14:35:01 +00:00
Stig Bakken
0e6fca4f22 * email address change 2003-03-18 12:06:09 +00:00
Ilia Alshanetsky
e15cc99415 Win32 build fix. 2003-03-17 22:25:55 +00:00
Ilia Alshanetsky
27a7eaf4e7 Fixed bug #22538 (failed stat on stdio/stdin/stderr streams). 2003-03-17 18:32:15 +00:00
Wez Furlong
cfd0466389 Fix for Bug #21310, based on a patch by jflemer@php.net. 2003-03-17 13:40:45 +00:00
Marcus Boerger
aba27fc6ca - disable html_errors per default as suggested by php.ini-<xxx>
- new error format that does not point to any documentation (if either
  not html_errors or no docref_root given e.g.: production boxes and default)
- documentation update in php.ini-<xxx>
# hope everyone is happy now
# and why on earth was enabling html_errors default?
2003-03-16 20:47:56 +00:00
Marcus Boerger
f60e8941e7 fix Bug #21751 - the parameter was wrong when this code was introduced 2003-03-15 16:39:35 +00:00
Wez Furlong
16e705a547 64bit fixes 2003-03-15 13:29:56 +00:00
Stefan Esser
10fc5dd573 reverting half the patch (it is not that simple) 2003-03-12 12:00:22 +00:00
David Hill
1edf7f55e5 64 bit corrections to parameters to OnUpdateInt Bug #20994 (Dave) 2003-03-10 14:50:16 +00:00
Marcus Boerger
d0fbdef419 fix warnings - one left 2003-03-08 16:53:54 +00:00
Stefan Esser
4535ff1756 fix possible XSS in error messages 2003-03-08 15:20:12 +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
Ilia Alshanetsky
4e6997ddf9 Fixed bug #22550 (overflow protection for upload_max_filesize ini setting). 2003-03-05 17:00:09 +00:00
foobar
61668d86b2 ws & CS 2003-03-04 14:12:39 +00:00
Ilia Alshanetsky
fb4dab36f4 Compiler warning fix. 2003-03-03 19:57:18 +00:00
Ilia Alshanetsky
4705fef539 More compiler warnings fixed. 2003-03-03 19:46:16 +00:00
Ilia Alshanetsky
94302c72b3 Compiler warning fix. 2003-03-03 19:41:36 +00:00
Ilia Alshanetsky
66c05f7035 Fixed compiler warnings. 2003-03-03 19:37:09 +00:00
Harald Radi
3e52882d3b adding disable_classes ini directive based on the
newly introduced zend_disable_class function
2003-03-03 01:27:22 +00:00
Zeev Suraski
1f63fba1b7 Fix old variable names 2003-03-02 15:41:12 +00:00
Zeev Suraski
622da33231 - Optimize $_REQUEST
- Fix phpinfo()
2003-03-02 13:35:01 +00:00
Zeev Suraski
4e55747a2b Add JIT initialization for _SERVER and _ENV
(it's less important for the others, even though it should be fairly
easy now too)
2003-03-02 10:19:15 +00:00
Moriyoshi Koizumi
6716188356 Reverted my previous commit 2003-03-01 18:47:18 +00:00
Wez Furlong
c3e6bcd398 Ensure that all fields are initialized to NULL. 2003-03-01 17:27:23 +00:00
Moriyoshi Koizumi
3de8b87cba Fixed build 2003-03-01 15:49:06 +00:00
Wez Furlong
242166d601 Don't shutdown() unix sockets.
It causes the server end to close down/break.
2003-03-01 15:22:21 +00:00
Wez Furlong
a3cf1ab8f6 Folding fixes 2003-03-01 15:20:42 +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
Rasmus Lerdorf
1ad304c2c5 MFB config-file-scan-dir crash fix 2003-02-28 20:48:38 +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
foobar
08b5f6b2b9 - No need to include the ssl headers elsewhere but in ext/openssl
# ext/ftp doesn't use streams yet so it needs to include them.
2003-02-28 07:25:15 +00:00
Wez Furlong
cd98ed7b0a Implement memory mapping for win32.
Could do with some rigorous testing; simple readfile() tests here appear to work.
2003-02-28 01:47:28 +00:00
Ilia Alshanetsky
e089944308 compiler warning fixed. 2003-02-28 00:08:00 +00:00
Wez Furlong
cfd8150b30 Add a generic meta data api for streams. 2003-02-27 19:10:24 +00:00
Wez Furlong
203068d055 Fixup build for win32 2003-02-27 18:06:31 +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
Sascha Schumann
60dcebd71a rename macro argument so that it does not partially match the string.
fixes a warning on unixware
2003-02-27 10:07:12 +00:00
Rasmus Lerdorf
ca2a28774a MFB: Get rid of a redundant syscall on non-Windows 2003-02-26 22:19:01 +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
foobar
411478e1f6 Fixed bug #20256 (snprintf() not defined) 2003-02-25 09:44:12 +00:00
Ilia Alshanetsky
5e118977cd Fixed various compiler warnings. 2003-02-25 01:44:57 +00:00
Ilia Alshanetsky
9e0fb1a33c Use native flock() whenever possible. 2003-02-25 01:41:58 +00:00
Ilia Alshanetsky
862634ffa5 Added locking to streams.
Allow PHP to automatically release locks on files when terminating the
stream.
Fixed bugs in the handling of the 3rd optional parameter to flock().
2003-02-25 01:39:06 +00:00
Moriyoshi Koizumi
4759048194 Removed unnecessary asserts 2003-02-24 23:13:40 +00:00
Wez Furlong
088e2692c3 MFB: Bunch of streams related fixes. 2003-02-24 21:40:23 +00:00
foobar
8c3cd0344d MFB: Fix for open_basedir error message 2003-02-23 22:30:02 +00:00
Wez Furlong
c1bdf163ed Add comment about thread-safety of gethostbyname on win32.
Set the correct path to the win32 config.h file in the .dsp file.
2003-02-21 14:06:55 +00:00
Rasmus Lerdorf
d08a0e99c8 An input filter might not simply strip stuff, it might also turn things
into entities or use some other mechanism which causes the filtered data
to be longer than the original data.  Ergo, pass in the address of the
buffer instead so the filter is free to reallocate it.
2003-02-20 22:21:49 +00:00
Rasmus Lerdorf
7429c2dc3f Input Filter support. See README.input_filter for details.
@- Input Filter support added. See  README.input_filter. (Rasmus)
2003-02-19 19:41:09 +00:00
foobar
0458bb5e2b MFB 2003-02-19 18:45:51 +00:00
Harald Radi
53d70b2c14 prevent xdebug from crashing 2003-02-19 16:17:15 +00:00
foobar
7e3b50896c ws/style fixes 2003-02-19 09:38:11 +00:00
foobar
ec11fe04e9 Fix the possible conflicts with other libs (like libc-client) 2003-02-19 09:25:16 +00:00
foobar
8e3f23e3c0 ws fixes + missing $Id$ tags, headers added 2003-02-19 08:40:19 +00:00
Wez Furlong
4c4d77d23e Fix incorrect TSRMLS_CC usage.
Fix com_create_guid()
2003-02-18 19:03:44 +00:00
Wez Furlong
e52aac940f Implement simple stream support in the ZE scanners. 2003-02-18 09:37:54 +00:00
Sara Golemon
6fe4ab41f0 Fix stream_filter_(ap|pre)pend to allow attaching on the read and/or write chains. Automagically decide what to do if noone tells us. 2003-02-18 02:53:24 +00:00
Wez Furlong
952d5f548e TSRMLS! 2003-02-18 01:39:26 +00:00
Wez Furlong
32165a5546 Implement new filter API, stage 1.
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c

The filters stack has been separated into one chain for read and one chain
for write.

The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
2003-02-18 01:22:21 +00:00
Zeev Suraski
4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00
Wez Furlong
6e296c5cbb Move some of the streams header into supplementary files
# Just when you thought you had learned your way around the streams code;
# I like to keep you all on your toes!
2003-02-17 00:20:38 +00:00
Wez Furlong
2cc68ad7ad Move streams files around a bit, to ease maintenance.
I will update the win32 .dsp in a moment.
2003-02-16 22:19:28 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
foobar
3a94aeae72 - Fix unsetting of open_basedir, safe_mode_exec_dir and user_dir with
"php_admin_value <ini option> none"
- Fixes bug #22220
2003-02-15 20:22:19 +00:00
Moriyoshi Koizumi
22517ce0de Fixed bug #22234 2003-02-15 19:56:12 +00:00
Wez Furlong
f98f27ffa9 MFB: Fix for bug #22199 2003-02-13 21:08:04 +00:00
Ilia Alshanetsky
f9669f6c49 Modified fix for bug #22187 so that it does not affect handling of numbers
represented in scientific notation.
2003-02-13 19:02:34 +00:00
Wez Furlong
cddcaf737f Another IS_SLASH fix. 2003-02-13 17:36:35 +00:00
Wez Furlong
cd7d762b79 A probable cure for many getcwd/relative include related problems for win32. 2003-02-13 17:20:20 +00:00
Ilia Alshanetsky
586672fd16 PAD() macro didn't increase the buffer size resulting in loss of the
padding.
2003-02-13 17:17:03 +00:00
Ilia Alshanetsky
343b92e66e Fixed a typo. 2003-02-13 16:22:03 +00:00
Ilia Alshanetsky
c28753de76 Simplified the mode validation code & added support for read+write mode to
'x' mode.
2003-02-13 15:09:39 +00:00
Wez Furlong
2953892df3 Clarify error message. 2003-02-13 14:52:54 +00:00
Ilia Alshanetsky
f8eba6ded2 Added 'x' mode for fopen() used on local files. This mode will create a new
file only if a file does not already exist (O_CREAT|O_EXCL).
2003-02-13 14:40:17 +00:00
Wez Furlong
77b98f8615 Potential fixes for #21809 and #22099. 2003-02-13 14:35:47 +00:00
Wez Furlong
35878992d8 Moving away from ANSI stdio for plain files. 2003-02-13 13:40:34 +00:00
Wez Furlong
068c90bd1d Whitespace-fix these goto labels. 2003-02-13 11:12:56 +00:00
Wez Furlong
b2b3596257 Fix for Bug #21815 (fpassthru ignored buffered data but then complained anyway) 2003-02-13 01:17:45 +00:00
Ilia Alshanetsky
f924aaf647 Fixed bug #22187 (spprintf function did not handle floats correctly). 2003-02-12 20:41:53 +00:00
Sascha Schumann
0cb1ff3bda - trims +100 lines of code from spprintf.c
- introduces an overflow detection in STR_TO_DEC
    - eliminates dead code (e.g. assert(foo); if (foo) {..})
    - removes unused macros from the original code
    - simplifies code (e.g. cc was completely dropped)
    - improves run-time performance

      The max_len feature is never used in our code base.
      Nevertheless, cpu cycles were spent on each string
      operation to check the current length against max_len which
      is quite inefficient.  Thus, I've moved the check to
      vspprintf where it is applied only once per call.
2003-02-12 19:38:10 +00:00
Stefan Esser
a0873a8f7d size matters not. 2003-02-11 21:44:02 +00:00
Stefan Esser
d2c550e991 8 + 20 + 1 + 1 = 30
There was no Bufferoverflow on 64bit systems.

And the "fix" broke the header code on systems with old style snprintf.
2003-02-11 21:41:32 +00:00
Marcus Boerger
e92f8f64e3 speed up 2003-02-11 20:30:37 +00:00
Moriyoshi Koizumi
6d95ea199d Fixed possible snprintf problem
# besides snprintf returns int value, not uint / size_t...
2003-02-10 20:18:08 +00:00
Moriyoshi Koizumi
9450b1e4b0 Fixed possible buffer overflow in 64bit systems 2003-02-10 20:11:10 +00:00
Moriyoshi Koizumi
9d5811c1f0 Jani happification 2003-02-10 19:45:34 +00:00
Moriyoshi Koizumi
21f766b7a4 Fixed zlib.output_compression so it can work even if zlib extension is built as shared 2003-02-10 19:04:44 +00:00
Sascha Schumann
ba32a619ae use SUCCESS/FAILURE instead of 0/-1 2003-02-09 21:15:55 +00:00
Ilia Alshanetsky
f98ea4c46d Added feature request #9173 (added stream_get_line(), this function will
read either the specified number of bytes or until the ending string is
found).
2003-02-09 20:43:05 +00:00
foobar
a09e1397c7 Fixed compile failures when ZLIB / PCRE are compiled as shared
extensions in same build.
2003-02-09 19:09:52 +00:00
Ilia Alshanetsky
a592f3cc56 Added missing definitions. 2003-02-07 22:49:21 +00:00
Ilia Alshanetsky
b1a6778fe5 Added get_browser() function. This function can be used to fetch the headers
sent by the server when a request is made for a given URL.
2003-02-07 21:33:35 +00:00
Zeev Suraski
021d1b684b Fixlet 2003-02-07 09:39:39 +00:00
Hartmut Holzgraefe
2546f09b08 proto-fix 2003-02-03 23:36:19 +00:00
foobar
173b9493e2 Fixed bug: #22011 (-n must ignore all ini files) 2003-02-03 12:25:28 +00:00
Ilia Alshanetsky
ccf8365baa Fixed bug #22021. 2003-02-02 23:09:24 +00:00
Ilia Alshanetsky
87a113f5c1 Fixed build on Solaris (patch by Melvyn Sopacua). 2003-02-02 20:26:46 +00:00
Sascha Schumann
4cf174cbd4 Fix sticky EOF problem
Sometimes streams signal a temporary EOF, because all current data
has been consumed. But that does not preclude the possibility that
more data will become available later.

Thus we must not treat eof in the read path as final.

Now, "tail -f" like scripts work again.
2003-01-30 21:06:34 +00:00
Harald Radi
f8e014b228 MFPHP_4_3 2003-01-29 00:49:09 +00:00
Derick Rethans
1ca8d7d4c3 - Fix includes 2003-01-28 16:05:34 +00:00
Ilia Alshanetsky
4fe6fc8b0b Fixed compiler warning. 2003-01-28 16:04:10 +00:00
Ilia Alshanetsky
b9a7918c43 2nd part of Sebastian's patch. 2003-01-28 00:42:54 +00:00
Ilia Alshanetsky
d59d500af7 Moved the scandir code into it's own files so that it can be used by other
OSes where libc does not have a native scandir() implementation.
2003-01-27 20:39:31 +00:00
Ilia Alshanetsky
9bb3dc6903 Removed pointless checks. 2003-01-27 17:22:22 +00:00
Shane Caraveo
82f6cef483 Fix broken build by adding scandir and alphasort for win32 2003-01-26 01:39:18 +00:00
Ilia Alshanetsky
8d352d2dd6 Fixed bug #21625 (When scanning a directory for ini files, do so in
alphabetical order. This gives a user a way to control the order in which
the ini files are loaded).
Fixed a bug that would make the code try to read files without an extension
as ini files.
2003-01-25 21:13:00 +00:00
Sascha Schumann
294e776d95 add sapi_get_target_uid/_gid for obtaining information about the
non-privileged user the web server is running as.  this is useful
for creating shared memory segments which need to be accessed by
the child processes/threads.
2003-01-21 11:03:58 +00:00
Harald Radi
b51b6f0fbf ini patch to allow 'entry[] = value' entries 2003-01-19 12:18:46 +00:00
Sebastian Bergmann
0e178230b2 Move ZEND_ENGINE_2 check to where it is defined. 2003-01-17 06:15:24 +00:00
Harald Radi
914cf3c0f8 move the ZE2 check into internal_functions_win32.c 2003-01-16 22:09:58 +00:00
Harald Radi
dd67c075bc add COM 2003-01-16 18:17:48 +00:00
Harald Radi
7c0e7b4fe8 prevent HEAD + ZE1 builds and add COM 2003-01-16 18:16:50 +00:00
Sascha Schumann
6f4333c7ae scrap STANDARD_SAPI_MODULE_PROPERTIES; it is causing more harm than good 2003-01-15 21:13:01 +00:00
Sebastian Bergmann
be3427e4f0 Define PHP_CAN_SUPPORT_PROC_OPEN. 2003-01-15 16:53:49 +00:00
Sascha Schumann
0855c0b603 whitespace 2003-01-15 11:30:39 +00:00
Sascha Schumann
4668b7130b whitespace 2003-01-15 11:22:04 +00:00
Harald Radi
c3867a7c8e HEAD defaults to build with ZE2 now 2003-01-10 23:36:18 +00:00
Ilia Alshanetsky
9b560970f8 Fixed compiler warnings. 2003-01-09 22:33:43 +00:00
Sara Golemon
4d789b593f Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist.
Extended php_checkuid function to add "flags" field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown.
2003-01-09 21:57:45 +00:00
Zeev Suraski
d35ddb740e Time for an update 2003-01-09 10:03:26 +00:00
Ilia Alshanetsky
a7ac507ade Fixed bug #21499 (more descriptive message in the event of require/include
failure).
2003-01-08 02:44:09 +00:00
Stefan Esser
58d65abbcb Adding support for anonymous fileuploads (#21450) 2003-01-06 23:51:28 +00:00
Wez Furlong
39848ce35c Fix for Bug #20827: where stat is a macro on Tru64.
Patch from <julien.soula@free.fr>
2003-01-06 23:27:03 +00:00
Wez Furlong
52a3c29e22 Fix for bug #21406; infinite loop during filter flushing. 2003-01-06 14:00:57 +00:00
Sara Golemon
42e912da79 Expose stream_filters_hash so that it can be searched by stream_get_filters() 2003-01-06 04:06:40 +00:00
Zeev Suraski
968f3f9a12 Remove unnnecessary initialization 2003-01-05 16:11:10 +00:00
Sebastian Bergmann
b5d97e5ddb Revert config.w32.h.in -> config.w32.h build step per discussion with Zeev. 2003-01-05 15:58:29 +00:00
Anantha Kesari H Y
3e2f1526bc A new file added and some old files modified for NetWare. 2003-01-03 12:48:14 +00:00
Derick Rethans
b9e54cb693 - Fixed bug #21169: Compile Failure, and lots of warnings on UnixWare 2003-01-02 18:01:10 +00:00
Derick Rethans
da9eb594c6 - Fix warnings on UnixWare 2003-01-02 13:31:10 +00:00
Wez Furlong
a28eaf64d0 Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for
files fopen()ed with that mode.
2003-01-01 09:58:17 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Ilia Alshanetsky
87a8b04051 Fix ZTS build. 2002-12-31 00:04:52 +00:00
Ilia Alshanetsky
0acb52fc3b Fixed bug #21228 (broken check for ob_gzhandler).
Fixed a bug that made ob_start return incorrect return value.
2002-12-30 19:39:31 +00:00
Derick Rethans
d454becda8 - Whitespace 2002-12-30 15:03:50 +00:00
Ilia Alshanetsky
1f50681813 Fixed bug #21149 (fixed handling of unterminated '['). 2002-12-29 21:02:17 +00:00
Edin Kadribasic
46219c714d MFB:
Made ZLIB extension built in on Windows. Fixes #21139.
2002-12-26 13:40:32 +00:00
Wez Furlong
05ea039144 MFB: fpos_t -> off_t 2002-12-23 02:56:46 +00:00
Wez Furlong
efea12fec5 Fix for Bug #21131: fopen($file, 'a+') would incorrectly assume that
the stream position was at offset 0.
This corrects that assumption by querying the stream for it's position
when it detects the 'a' "flag" in the mode parameter to fopen.
Also added a test for plain files and amended the userstreams test to
take this into account.
2002-12-22 18:05:36 +00:00
Wez Furlong
90c478664a A Simple fix for Bug #12360 (fsockopen timeout doesn't work).
Analysis:
On systems with HAVE_GETADDRINFO and IPV6 support, php_hostconnect would
attempt to connect to each possible address that matched the requested IP.

If the remote host:port combination are dropping packets this would cause the
first connection to timeout (after waiting for the full timeout duration).

PHP would then attempt the second address and wait the full duration again.

Solution:
If the first connection attempt times out, abort the connection loop.
2002-12-22 13:55:45 +00:00
Wez Furlong
602734c7d9 Correct mistake introduced by my last commit on these files;
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.
2002-12-19 20:23:50 +00:00
Ilia Alshanetsky
5bad812dad A better, strtok() free implementaion of php_disable_functions(). 2002-12-16 15:43:52 +00:00
Stefan Esser
75d8056e11 cleanup 2002-12-14 10:45:25 +00:00
Wez Furlong
c5d4e4b321 MFB: popen/pclose and proc_open/proc_close fixes. 2002-12-12 17:51:25 +00:00
Ilia Alshanetsky
60a5aeef43 Fixed a few compile warnings and one compile error. 2002-12-10 20:16:30 +00:00
Ilia Alshanetsky
e982d5c7f0 MFB 2002-12-10 16:39:59 +00:00
Ilia Alshanetsky
3c9a6a8890 Removed one more unneeded check. 2002-12-10 15:58:31 +00:00
Ilia Alshanetsky
ecc9c539d2 Removed a pointless check. Thanks Stefan. 2002-12-10 15:36:26 +00:00
Wez Furlong
5029c73096 Emulate fopencookie on *BSD systems.
Patch mostly from Melvyn Sopacua <msopacua@idg.nl>
2002-12-09 16:14:28 +00:00
Wez Furlong
164130ed22 MFB: #20831 fix 2002-12-09 10:38:35 +00:00
Ilia Alshanetsky
683251eba3 Fixed bug #20796. $_GET/$_POST/$_COOKIE data can get overwritten when
register_globals are on and input contains arrays.
2002-12-07 16:05:27 +00:00
Ilia Alshanetsky
8425dbd0bc Fixed bugs #20725 & #20860. Post form variables get lost if the uploaded
files cannot be written to disk.
2002-12-07 00:48:13 +00:00
Marcus Boerger
4ce4a1c32c php_error -> php_error_docref 2002-12-05 21:53:25 +00:00
Marcus Boerger
8ed84254cd -php_error -> php_error_docref 2002-12-05 21:46:08 +00:00
Moriyoshi Koizumi
c7a0b0d262 Reverted wrong part of the commit made in 1.24 2002-12-02 20:11:59 +00:00
Shane Caraveo
a3bd39429c Fix CGI to match cgi spec.
This patch properly fixes support for CGI in PHP.  For backwards compatible
broken behaviour, cgi.fix_pathinfo can be set to zero in php.ini.
CGI failed to work under apache at all, either using the cgi-script directive
or as a ScriptAlias setup. Typicaly it would try to parse itself.  This will
still happen if you dissable fix_pathinfo, and set DISCARD_PATH.
This also fixes PATH_INFO, and finally we can run pres2 under cgi or fastcgi.
This patch has been tested under Apache 1.3, 2.0, IIS, as both cgi and fastcgi,
on Windows and OSX.  A followup patch with build stuff for linux will follow.
2002-12-01 21:37:14 +00:00
Shane Caraveo
529762a21a php_error_docref aborts cgi. This broke using php as cgi under
apache/mod_cgi with the cgi-script directive and bang lines in php scripts.
removing it allows this to work again.
2002-12-01 21:28:27 +00:00
Sascha Schumann
2b95b3c83b add a "force HTTP/1.0 response" facility to the SAPI layer
this is necessary, when you want to take over control of a connection
and the web server is doing stupid things by default (like enabling
chunked transfer encoding for no reason).
2002-12-01 03:28:21 +00:00
Marcus Boerger
0d7957bc15 Bug #20433 2002-11-30 18:36:17 +00:00
foobar
7f48a6f13b MFB 2002-11-29 14:48:17 +00:00
foobar
dd53efc196 - Made the STANDARD_SAPI_MODULE_PROPERTIES be what it says it is. 2002-11-26 05:57:06 +00:00
Sascha Schumann
09f463ddae Add sapi_get_fd() and implement it for the Apache/thttpd SAPIs. 2002-11-26 05:15:55 +00:00
Hartmut Holzgraefe
8bd550825f email address change 2002-11-25 12:30:28 +00:00
Marcus Boerger
517af84b0a MFB: Fix memleak in debug mode 2002-11-23 01:24:08 +00:00
Stefan Esser
9dae1475ef little fix 2002-11-22 19:34:17 +00:00
Marcus Boerger
b7cd48efdd Make it possible to test language features like newly introduced 'abstract'
independantly from debug mode.
2002-11-21 14:56:06 +00:00
Hartmut Holzgraefe
fb5ac5d286 the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
counted up, so lets make it happy although this value is not really
needed in these cases ...
2002-11-21 10:29:11 +00:00
Marcus Boerger
c41b6b2967 Allow error_prepend and error_append being empty as used in run-test.php 2002-11-19 14:11:50 +00:00
Marcus Boerger
f0daa5c6d9 Fix warning as discussed with Wez. 2002-11-18 17:23:21 +00:00
Wez Furlong
039d6a1668 wb -> r+b 2002-11-18 12:40:12 +00:00
Wez Furlong
5b7537ecd2 Merge the temp file mode fix from the branch,
add missing Id tag.
2002-11-18 11:49:06 +00:00
Wez Furlong
ca58966a0d Merge streams changes from branch. 2002-11-18 11:39:42 +00:00
Sebastian Bergmann
51e4dbaba0 Fix ZTS build. 2002-11-18 06:04:06 +00:00
George Schlossnagle
99c7ddc3a8 added support functions for the apache_hooks SAPI 2002-11-18 00:59:23 +00:00
Ilia Alshanetsky
f14b742392 Fixed bug #20466. 2002-11-17 22:52:47 +00:00
Ilia Alshanetsky
cea2419529 Upgraded the bundled expat library to 1.95.5 (latest stable, atm).
Fixed bug #20442.
2002-11-17 18:37:48 +00:00
Zeev Suraski
d372861f03 Unify handling of error_reporting - fix bug #16137 2002-11-17 13:26:38 +00:00
Ilia Alshanetsky
3bef247fcc Fixed a problem that would cause include/require("/dir/file") to fail on
Windows.
2002-11-17 00:06:50 +00:00
Stefan Esser
658fd1ba8d Fixing possible remote overflow due to mbstring translation. 2002-11-14 16:30:07 +00:00
Derick Rethans
bab4957d1c - MFB: Fixed bug #20484 (stream_get_meta_data crashes on a normal file
stream). (Derick, Wez)
2002-11-14 10:56:35 +00:00
Edin Kadribasic
f15420b3e1 Allow mbstring defines to be somewhere else without warnings. 2002-11-13 21:28:16 +00:00
Andrei Zmievski
0eea23a4f8 Change version to 4.4.0-dev. 2002-11-13 19:19:05 +00:00
Sebastian Bergmann
8f54e30f3c Disable mbstring (and sync behaviour with *NIX per Andrei's commit). 2002-11-13 06:47:43 +00:00
Marcus Boerger
cecb9dfc79 Implemented -n switch to skip parsing ini at startup as suggested by Wez.
#The switch 'n' was planned to be used for beautifying....delete n to make
#clear these functions do not have a switch yet.
2002-11-12 20:56:47 +00:00
Hartmut Holzgraefe
be5e379ec6 HTTP_RAW_POST_DATA BC fixes
# hopefully all done, commiting anyway to continue work on my home box
php://input stream fixes (POST data handerl mangles data, CLI crashbug)
2002-11-12 18:29:11 +00:00
Ilia Alshanetsky
8ed36bc318 Changed max_input_time PHP_INI_SYSTEM|PHP_INI_PERDIR because ini_set() will
already be too late, the POST/GET/COOKIE processing occures before the script
gets parsed.
Changed the default value to -1. If users have previously (older PHPs)
adressed the problem by setting timeout to a large value, we can avoid breaking
their script by detecting the -1 and using timeout_seconds instead of
max_input_time when setting the 'input' timeout.
2002-11-12 14:40:00 +00:00
Ilia Alshanetsky
bb14455e62 Added missing zend_lineno initilization. 2002-11-10 19:28:51 +00:00
Ilia Alshanetsky
91a203e8cd Fixed a bug that in many situations would cause open_basedir restriction to
be bypassed. Most notable exception, is the inclusion of files via include(),
with a partial path.
2002-11-10 05:14:26 +00:00
foobar
609992baeb ws fixes 2002-11-10 02:48:22 +00:00
Stig Bakken
cd72343bb3 * honor track_errors ini setting in php_verror() 2002-11-10 02:09:26 +00:00
Ilia Alshanetsky
2a291ba362 Made open_basedir error more descriptive. 2002-11-08 22:48:01 +00:00
Hartmut Holzgraefe
5aec6f4e33 fix for #20198:
"always_populate_raw_post_data = On" breaks HTTP file uploads
2002-11-08 08:41:52 +00:00
Sascha Schumann
6442b86bfa bumb api version because of module_startup change 2002-11-07 11:52:45 +00:00
Ilia Alshanetsky
78e2e69b23 Instead of checking whether realpath exists based on OS. Use the
HAVE_REALPATH define, which is set if realpath() is avaliable. This patch
also resolves bug #18868.
2002-11-06 18:07:23 +00:00
Marcus Boerger
a73e74c2f8 Make the macro use the function and not the other macro as discussed
with Wez.
2002-11-06 00:17:44 +00:00
Marcus Boerger
1f0b200188 php_stream replacement for fprintf
#Agreed by Wez - I will use this mysel soon.
2002-11-06 00:15:24 +00:00
Ilia Alshanetsky
cfe0c82034 Added 4th argument to virtual_file_ex() that specifies whether or not
realpath() should be used during path resolving. In a number of functions
we do not want to use realpath(), since realpath() will resolve symlinks.
2002-11-05 14:50:17 +00:00
Marcus Boerger
8f6120fef4 correct define: silences compiler warning in http_fopen_wrapper.c 2002-11-05 11:10:06 +00:00
David Reid
464d8ca5c1 Work around a daft mistake in the beos headers... 2002-11-04 21:20:52 +00:00
Colin Viebrock
1fe68ddde5 ahem 2002-11-01 23:00:32 +00:00
Wez Furlong
ae4c3c22e1 Probable fix for #20180. 2002-11-01 04:58:23 +00:00
Ilia Alshanetsky
2eaae61f3b Reverting previous OpenSSL patch. 2002-11-01 03:25:21 +00:00
Ilia Alshanetsky
9b35c0a897 Possible fix for #20014. Suggested by wez@php.net 2002-11-01 00:57:54 +00:00
Wez Furlong
f8486bc344 Fix for #19508 by poleson@verio.net. 2002-10-29 14:57:12 +00:00
Ilia Alshanetsky
e300e0df59 Fix win32 build. 2002-10-28 12:37:31 +00:00
Ilia Alshanetsky
728eacbf52 A better fix for bug #20110. 2002-10-28 03:45:21 +00:00
Sterling Hughes
29a344b384 remove $_FILES from $_REQUEST as per php-dev conversation... 2002-10-28 02:46:09 +00:00
Ilia Alshanetsky
f76b9649cd Fixed bug #20110. 2002-10-28 00:28:11 +00:00
Shane Caraveo
5ef76f6707 dont memmove a null pointer. caught by bounds checker. 2002-10-27 23:34:48 +00:00
Shane Caraveo
bb55b3a420 fix Bug #20126
write returns an int, with < 0 being a failure.
2002-10-27 23:01:45 +00:00
Andrei Zmievski
615c033ea8 Back to 4.3.0-dev. 2002-10-27 19:51:17 +00:00
Andrei Zmievski
939de5b8d3 Update to -pre2. 2002-10-27 19:07:45 +00:00
Derick Rethans
7592362b4c - Allow the report_memleak setting to be set everywhere 2002-10-24 16:56:59 +00:00
Sascha Schumann
2909e5c9c9 centralize #include "build-defs.h" and drop (sometimes inconsistent) other
instances
2002-10-24 13:15:49 +00:00
Moriyoshi Koizumi
e8be0db546 Fixed build when mbstring is not used - my previous patch is insufficient. 2002-10-24 02:59:01 +00:00
Moriyoshi Koizumi
73ca375f37 MFH; we would see a nasty problem again if it was not fixed... 2002-10-24 02:56:28 +00:00
Moriyoshi Koizumi
74883a9583 Make php_mb_is_mb_leadbyte() obsolete. It only works with double-byte chars.
# Sorry Marcus, it seems we were working simultaneously :)
2002-10-23 23:25:27 +00:00
Moriyoshi Koizumi
afa9f42f47 Function renaming. 2002-10-23 19:51:50 +00:00
Moriyoshi Koizumi
fdc91ccc73 Renaming the functions. 2002-10-23 18:32:55 +00:00
Moriyoshi Koizumi
b7703551ed Remaned the functions for consistency 2002-10-23 16:54:31 +00:00
Derick Rethans
d54f58d164 - Trying to clean up this mess :) 2002-10-23 09:35:21 +00:00
Derick Rethans
273d5e04d2 - No reason why implicit_flush should not be settable from a script 2002-10-23 09:31:33 +00:00
Ilia Alshanetsky
a5d3427251 When doing automatic line end detection, pick the line end that is found
first.
2002-10-22 15:34:50 +00:00
Wez Furlong
dabf1053cd Refine stream_select() to work with streams that have data in their read
buffers.
When selecting for read, the streams are examined; if any of them have
pending read data, no actual select(2) call is performed; instead the
streams with buffered data are returned; just like a regular select
call.
Prevent erroneous warning in stream_select when obtaining the fd.
2002-10-21 22:54:37 +00:00
Hartmut Holzgraefe
07b90cafc9 removed left-over unused variable 2002-10-21 19:18:39 +00:00
Hartmut Holzgraefe
8841dfc995 removed bogus paranoid header checking 2002-10-21 18:44:50 +00:00
Hartmut Holzgraefe
8b7e9d7774 some changes to how request input data (Content-Lenght >0) is handled
- webdav-specific stuff removed (should be handled using httpd.conf
  LIMIT or equivalents)
- always_populate_raw_post_data now working on any method, not just
  POST (and webdav methods with allow_webdav_methods), when
	Content-Length is greater zero
- raw input data is also available using php://input stream,
  this way one doesn't have to care about memory_limit
- input data is now always consumed (although maybe ignored,
  this fixes we had withproblems with keep-alive connections
@ raw POST data is now available as php://input stream (hartmut)
2002-10-21 16:41:06 +00:00
Ilia Alshanetsky
b9efd22339 Fixed bug #16880. Added an ini option max_input_time that allows the user
to specify how much time a script may spend parsing input data (POST, GET, etc..).
2002-10-21 13:09:29 +00:00
Moriyoshi Koizumi
890aee56d1 MFH 2002-10-21 01:33:31 +00:00
Moriyoshi Koizumi
c536b52cb0 style fix 2002-10-20 23:05:34 +00:00
Ilia Alshanetsky
fef922307c Fixed incorrect handling of files starting with a . 2002-10-20 20:44:10 +00:00
Masaki Fujimoto
a6ecdca0ef fixed highlight related bugs (in case shift_jis input/output filters are enabled) 2002-10-20 02:57:40 +00:00
Ilia Alshanetsky
ec400b8d16 Silence compile warning, when compiling --with-openssl. 2002-10-19 17:05:08 +00:00
Ilia Alshanetsky
8ca0b28b6a Fixed a typo. 2002-10-19 16:50:07 +00:00
Wez Furlong
829f1855fd made fgets() binary safe.
php_stream_gets is now a macro which calls php_stream_get_line. The latter
has an option argument to return the number of bytes in the line.
Functions like fgetcsv(), fgetss() can be made binary safe by calling
php_stream_get_line directly.

# HEADS UP: You will need to make clean after updating your CVS, as the
# binary signature has changed.
2002-10-19 13:11:48 +00:00
Wez Furlong
f42b26bc22 Probable fix for #19944 2002-10-19 10:34:10 +00:00
Ilia Alshanetsky
4b83b189fe Fixed bug #19971 (optimized the file() function).
The file() function is now also binary safe.
2002-10-18 20:39:49 +00:00
Wez Furlong
7de1f45aaa Revert my last bogus commit.
Change the comparison to something that is less likely to inspire me to
make the same mistake again...
2002-10-18 17:14:32 +00:00
Wez Furlong
e0c0264935 Improve EOF detection. Fixes #19970. 2002-10-18 12:15:04 +00:00
Ilia Alshanetsky
5ce6d653b8 Fixed bug #19921. (memory leak introduced by me in rev 1.492) 2002-10-16 16:52:08 +00:00
Sebastian Bergmann
9f158fc9c0 Revert. Again. 2002-10-16 14:53:34 +00:00
Sebastian Bergmann
49e106d3d3 Patch by Urs Gehrig <urs@circle.ch>. 2002-10-16 07:37:28 +00:00
Wez Furlong
2f6952c936 Nope, that last one wasn't a leak in main/streams.c, it was
file_get_contents misinterpreting the result...
2002-10-15 16:45:26 +00:00
Wez Furlong
fa1f06b69f Fix mem leak for zero-byte files. 2002-10-15 16:38:11 +00:00
Wez Furlong
842b5554e0 Some buffer paranoia.
Also, make feof() detection safer (ala recent changes to zlib extension).
2002-10-15 16:04:46 +00:00
Ilia Alshanetsky
bf51192d67 Fixed possible memory leaks. 2002-10-15 02:05:27 +00:00
Wez Furlong
6890f98e70 Fix leak, and avoid initialization problems where retval is re-used
within a function.
2002-10-15 01:57:19 +00:00
Sebastian Bergmann
64a22c8a3e Revert to 1.34. 2002-10-14 16:14:18 +00:00
Sebastian Bergmann
276b314ed3 Whitespace fixes. 2002-10-14 05:56:03 +00:00
Sebastian Bergmann
2e68e0beba Fix Win32 build. 2002-10-14 05:54:15 +00:00
Wez Furlong
106631fce1 *cough*
Fix inverted logic for the assert.
2002-10-14 05:38:50 +00:00
Wez Furlong
86e60a2d7a @- fgets($fp) (with no length parameter) now uses a buffer as long as the
@  the next line available from the $fp. Previously, there was a 1KB limit.
@  (Wez)
2002-10-14 02:28:35 +00:00
Wez Furlong
be5606504c Implement better SSL error handling. 2002-10-14 01:27:43 +00:00
Wez Furlong
483f355d30 Fix stream_eof result interpretation (and thus the user-streams test). 2002-10-14 00:16:02 +00:00
Wez Furlong
2d97f4d4c7 Remove some old code. 2002-10-13 23:43:46 +00:00
Wez Furlong
0bcd2ccb2c A much better probable fix for #16114. 2002-10-13 23:43:21 +00:00
Wez Furlong
bc0948bbda Probable fix for #16114 2002-10-13 23:21:05 +00:00
Wez Furlong
5f7c347f17 Fix a nasty nasty bug:
When not enough data to satisfy a read was found in the buffer, fgets modifies
the buf pointer to point to the position to store the next chunk.  It then
returned the modified buf pointer, instead of a pointer to the start of the
buffer.

Also added some infrastructure for making fgets grow the buffer on-demand to
the correct line-size.  Since streams uses reasonable chunk sizes, the
performance of the realloc's should be pretty good; in the best case, the line
is already found completely in the buffer, so the returned buffer will be
allocated to precisely the correct size.

In the worst case, where the buffer only contains part of the line, we get a
realloc per buffer fill. The reallocs are either the size of the remainder
of the line, or the chunk_size (if the buffer sill does not contain a complete
line).  Each realloc adds an extra byte for a NUL terminator.

I think this will perform quite well using the default chunk size of 8K.
2002-10-13 22:52:33 +00:00
Wez Furlong
70b796b143 (php_socket_errno) win32 errno compatible macro.
(php_socket_strerror) win32 compatible strerror replacement.
Add an E_NOTICE when a socket write fails.
2002-10-13 22:01:40 +00:00
Shane Caraveo
96b9c0a523 make php_import_environment_variables overwritable so fastcgi can correctly
set $_ENV.
2002-10-13 08:38:09 +00:00
Wez Furlong
4308a399b9 paranoia 2002-10-12 02:56:34 +00:00
Wez Furlong
258aa4d239 Write in blocks of the current chunk_size for a stream.
Should resolve problems with network writes.
2002-10-12 02:31:42 +00:00
Edin Kadribasic
9f4abb7ae4 Revert Stig's patch. Windows build should work again. 2002-10-11 09:20:38 +00:00
Sebastian Bergmann
5f56185a62 Break it again (after 4.3.0-pre1 :-) 2002-10-10 19:08:13 +00:00
Andrei Zmievski
3b32aa7d33 Back to 4.3.0-dev. 2002-10-10 19:07:12 +00:00
Sebastian Bergmann
f2155df039 Revert to revision 1.13 for 4.3.0-pre1. 2002-10-10 17:45:36 +00:00
Andrei Zmievski
bb4aefacd0 Update to 4.3.0-pre1. 2002-10-10 17:34:12 +00:00
foobar
8f92778136 revert version here too.. 2002-10-08 19:44:04 +00:00
Stig Bakken
231efd186f * make these variables configurable from environment on Windows:
PEAR_INSTALLDIR           PHP_BINDIR      PHP_CONFIG_FILE_PATH
  PHP_CONFIG_FILE_SCAN_DIR  PHP_DATADIR     PHP_EXTENSION_DIR
  PHP_INCLUDE_PATH          PHP_LIBDIR      PHP_LOCALSTATEDIR
  PHP_PREFIX                PHP_SYSCONFDIR
2002-10-08 01:04:52 +00:00
Stefan Esser
46f4a07d1c Closing protected variables hole 2002-10-07 11:23:24 +00:00
Zeev Suraski
1143a7023c Whitespace 2002-10-07 11:21:06 +00:00
Sascha Schumann
88b2d8bb8f stdio buffers data in user land. By calling fflush(3), this
data is sent to the kernel using write(2). fsync'ing a
file descriptor is not required -- writing to a fd has the same
affect as calling fflush after each fwrite.
2002-10-07 03:12:06 +00:00
Wez Furlong
510f3b0305 Try to ensure that we return the number of bytes requested during fread(). 2002-10-06 23:27:53 +00:00
Zeev Suraski
df55f35798 Revert the implicit_flush mess.
Do not revert it again under any circumstances!

Yasuo/anybody else - if there are issues with implicit_flush, please inform
me and I will fix them.
2002-10-06 12:02:53 +00:00
Zeev Suraski
de36720e0e Begin the cleanup - remove ob_flush_all() 2002-10-06 09:06:24 +00:00
Andrei Zmievski
f7ef0ccd17 Change HEAD version to 4.4.0-dev. 2002-10-05 20:37:12 +00:00
Wez Furlong
9d5bab5a0d EOF related fixes. 2002-10-05 10:59:35 +00:00
Wez Furlong
077fe52d8b This seems to resolve the issues with fgets.
I've moved EOF detection into the streams layer; a stream reader
implementation should set stream->eof when it detects EOF.
Fixed test for user streams - it still fails but that is due to an output
buffering bug.
2002-10-05 10:35:13 +00:00
Brian France
3340e82508 Fixed a problem where opendir with <path>/ and having <path>/ in
open_basedir ini option didn't work.  It was removing the trailing
        slashes and then addeding it back to only one of the string,
        now it adds it back to to both if needed.
2002-10-04 22:16:16 +00:00
Sascha Schumann
bfd2a857b2 Fix EOF cases
Noticed by: Ilia
2002-10-04 19:48:59 +00:00
Sascha Schumann
1918011c01 Interrupt loop, if the stream op fails. 2002-10-04 19:36:09 +00:00
Sascha Schumann
5e97e66abb Nuke warning 2002-10-04 19:20:13 +00:00
Sascha Schumann
a4ec211e9e Add a few notes 2002-10-04 19:08:43 +00:00
Wez Furlong
9c5883bdf6 replace dont_block with a flag. 2002-10-04 18:59:34 +00:00
Ilia Alshanetsky
08645d53c0 Fixed bug #19746 2002-10-04 18:44:47 +00:00
Sascha Schumann
4f7e6dadd8 Improve the general behaviour of stream_gets and fix its semantics
with regard to sockets. The behaviour should be aligned with PHP 4.2 now.
This has been verified to some degree.

If the underlying stream operations block when no new data is readable,
we need to take extra precautions.

If there is buffered data available, we check for a EOL. If it exists,
we pass the data immediately back to the caller. This saves a call
to the read implementation and will not block where blocking
is not necessary at all.

If the stream buffer contains more data than the caller requested,
we can also avoid that costly step and simply return that data.
2002-10-04 18:21:40 +00:00
Marcus Boerger
518e61de97 suggest paranthesis around || and && 2002-10-04 17:11:35 +00:00
Sebastian Bergmann
1014d78515 Add PHP_CONFIG_FILE_SCAN_DIR. 2002-10-04 05:22:13 +00:00
Rasmus Lerdorf
989a61ed98 As discussed, add --with-config-file-scan-dir compile-time switch defining
a directory which will be scanned for *.ini files after the main php.ini
file has been parsed.  This makes it much easier to automatically deploy
a modular PHP since adding extensions which have their own ini switches can
now be done by simply dropping a foo.ini file in the right directory and
restarting.  A list of parsed ini files is maintained and shown on the
phpinfo page.
2002-10-04 04:47:35 +00:00
Marcus Boerger
3ee8172674 fix position handling 2002-10-03 16:06:41 +00:00
Yasuo Ohgaki
39b0eb9b22 Fixed broken code by Derick.
ob_implicit_flush() and ob_flush_all() are stopped working.
var_dump() and hightlisht_string() outputs buffer contents wrongly
with ob_implicit_flush().

Everyone should be happy now.
It was only OG(implicit_flush) interpretation issue after all.
2002-10-03 13:32:01 +00:00
James Moore
df431074de Keep comments and code in sync. 2002-10-03 11:56:10 +00:00
Zeev Suraski
d58c3dda96 Guys, please keep K&R. 2002-10-03 11:18:39 +00:00
Sebastian Bergmann
b169932d1c Fix warnings. 2002-10-03 11:08:09 +00:00
Derick Rethans
9b517c4b93 - Revert changed to implicit_flush behavior. The new behavior was not
intended in the first place.
2002-10-03 10:35:33 +00:00
Yasuo Ohgaki
6c7202e116 Added comment for php_output_set_status().
Please use this function if you would like to prevent unwanted flush
by implicit_flush=On or ob_implicit_flush().
2002-10-03 08:54:13 +00:00
Yasuo Ohgaki
66a50c5373 Added ob_flush_all() that flushes bufferred contents until it actually
sent/printed.
@ Added ob_flush_all() that flushes all buffers. (Yasuo)
2002-10-03 07:17:14 +00:00
Yasuo Ohgaki
f534dc8f47 Added missing proto and foldings. 2002-10-03 04:17:41 +00:00
Yasuo Ohgaki
22bf29384e Move wrong output buffer usage check to ob_gzhandler init.
Export some output buffer functions.
2002-10-03 03:58:12 +00:00
Yasuo Ohgaki
bec4574f57 Made some functions inline.
Added static for unexported functions.
2002-10-03 02:55:19 +00:00
Yasuo Ohgaki
bd177ce7c1 Added ob_get_clean() and ob_get_flush().
Someone requested this feature before.
@ Added ob_get_clean() and og_get_flush(). (Yasuo)
2002-10-03 01:36:44 +00:00
David Reid
cf2e12a01e Add some more BeOS support. 2002-10-02 23:48:58 +00:00
Marcus Boerger
1e6557f664 Fix implicit_flush 2002-10-02 15:36:29 +00:00
Marcus Boerger
ff51ed7c6f Modified get_status(): Display chunk_size allways and size which is in
most cases initial_size as well as block_size only when used.
2002-10-02 15:10:11 +00:00
Marcus Boerger
d4bba6d158 Revisted Wez patch: chunk_size 0 means cahce the whole output. So
we must apply the default before calling php_enable_output_compression().
I have left the default setting in the rinit function even though i do think
it is not necessary.
2002-10-02 15:02:16 +00:00
Marcus Boerger
4a1d83aa8c Another missing variable init
#Wez shouldn't "stream->filterhead->fops->flush()" affect return value also?
2002-10-02 13:25:38 +00:00
Marcus Boerger
efec24d22d Missing variable init 2002-10-02 13:18:01 +00:00
Yasuo Ohgaki
e92abff88b Fixed bug #17825. Double zval_ptr_dtor(). 2002-10-01 10:01:56 +00:00
Yasuo Ohgaki
3d8e33f06a Fixed implicit flush. 2002-10-01 02:43:33 +00:00
Yasuo Ohgaki
ecf146cbce Users can shoot themselves by their own output handler always.
Therefore, this check is overkill and it should be documented
limitation, IMO.

Anyway, a little optimization.
2002-09-30 23:46:43 +00:00
Wez Furlong
4356932dfe Fix infinite recursion bug when using zlib output compression.
Cause: the chunk size is taken from the zlib.output_compression setting,
which is 0 or 1.  This causes the block_size for output buffer to be set
to 0 (1 / 2) and thus causes infinite recursion in php_ob_allocate().
Solution: use a value of 0 for the chunk size which will use the default
sizes.  Also add a sanity check which will default the block_size to 1
if it ends up as 0.
2002-09-30 10:18:06 +00:00
Ilia Alshanetsky
7f18442882 Fixed a mem leak inside the path resolving code. 2002-09-29 22:16:29 +00:00
foobar
7aaa6bd77d ws fix 2002-09-29 19:22:39 +00:00
Sascha Schumann
e6e54605b7 Follow Yasuo's suggestion and build sapi program's under the sapi-specific
directory.

Move sapi-specific makefile fragments to their respective directory.

Create an embed sapi module which resides in its own dir now.
2002-09-29 16:22:49 +00:00
Derick Rethans
57b11623b9 - Fix Edin's name 2002-09-29 10:00:07 +00:00
Edin Kadribasic
946206f0d2 Added php/embed toolkit for embedding PHP engine into C/C++ applications.
See my post to php-dev on the subject.
2002-09-29 02:45:25 +00:00
Wez Furlong
7694770304 Rename streams functions to fit with naming conventions, adding aliases
for old functions where required.
Make use of recent changes to chunk size and timeout setting code.
2002-09-28 22:14:21 +00:00
Wez Furlong
9509c20941 remove chunk size setting code (it's now in streams.c).
Move timeout setting code.
2002-09-28 22:12:23 +00:00
Wez Furlong
393d57d5be Differentiate between write buffer and streams read buffer sizes.
Add options for timeout and chunk size; previously these were only
set-able for socket streams.
2002-09-28 22:10:47 +00:00
Ilia Alshanetsky
3f8ec7e764 Fixed bug #13936 2002-09-28 20:13:28 +00:00
Rasmus Lerdorf
5a239ab059 Uh, this is what I meant to do. Fix for #19292 2002-09-28 16:27:10 +00:00
Rasmus Lerdorf
5eab8abd35 Probable fix for bug #19292 2002-09-28 16:10:43 +00:00
Wez Furlong
84e0df3dfe Allow user streams/wrappers to implement fstat(), opendir() and stat(). 2002-09-28 13:05:47 +00:00
Colin Viebrock
c7c275b741 fix phpinfo() output for better browser BC 2002-09-26 17:54:54 +00:00
Wez Furlong
a95fb6bfd6 Fix for #19580. (Incorrectly warning about lost data when that is not the
case on systems without fopencookie).
2002-09-26 16:22:28 +00:00
Wez Furlong
c484eb8c97 Fix segfault in wrapper error log mechanism when errors are logged on
second and subsequent events.
Implement very simple recursion protection for user streams written
like this:
class urlEncodeStream {
    var $fp = NULL;

    function stream_open($path, $mode, $options, &$opened_path)
    {
        $this->fp = fopen($path, $mode); // <-- this recurses infinitely
        return is_resource($this->fp);
    }
}

file_register_wrapper('urlencode', 'urlEncodeStream');
$fp = fopen('urlencode:///tmp/outputfile.txt', 'w');

Noticed by: Yasuo.
2002-09-26 12:12:27 +00:00
Wez Furlong
3a67c67737 Rename file_get_wrapper_data -> file_get_meta_data.
It now always returns useful information for all streams.
Unified that data with socket_get_status and made socket_get_status
an alias for file_get_meta_data.

Fix Location header following which was broken in this commit:
http://cvs.php.net/diff.php/php4/ext/standard/http_fopen_wrapper.c?r1=1.41&r2=1.42&ty=h
2002-09-26 10:14:41 +00:00
Sascha Schumann
6816ba4b32 We are about to enter 2003, sending two-digit years does not make too
much sense anymore.  According to an article from '98, only Netscape 3.x was
affected anyway.
2002-09-25 16:11:31 +00:00
Wez Furlong
696e0a2301 Implement persistent streams. (for pfsockopen).
Juggle some includes/definitions.
Tidy up streams use in ext/standard/file.c
2002-09-25 15:25:12 +00:00
Wez Furlong
ba2dc46117 Correct a buglet in the newly introduced buffer code.
# Andi: this might have been the cause of that problem you mentioned.
2002-09-23 23:39:46 +00:00
Wez Furlong
a2c344fa67 Ensure that the seekable stream returned for include("http://") under win32
is based on a temporary file rather than a memory stream.
2002-09-23 19:10:33 +00:00
Wez Furlong
031f019351 Enable include("http://....") under win32 by downloading to a temporary
stream so that flex will get on nicely with the content.
# untested; theoretically it should work just fine.
2002-09-23 19:07:38 +00:00
Wez Furlong
c6fdce6891 Remove allow_url_fopen checks from the user streams code.
Rationale: user streams might not be implementing network access,
and the administrator can disable the file_register_wrapper function
and other network access functions if s/he does not want to allow
this functionality.
2002-09-23 18:18:40 +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
Wez Furlong
a3cda3b32d Hopefully fix the other warnings that my last warning-fixing commit caused. 2002-09-23 15:21:16 +00:00
Wez Furlong
ad4afdf827 fix some warnings. 2002-09-23 14:50:21 +00:00
Zeev Suraski
85f4abfdac Fix bug #19525 2002-09-23 14:18:42 +00:00
Wez Furlong
9e84b3d5b5 Revise buffer/seek code a little.
Tidy up user streams even more.
Make test case quite aggressive.
2002-09-23 13:22:10 +00:00
Zeev Suraski
2f4ed252de Compat fix 2002-09-23 12:10:07 +00:00
Wez Furlong
4d8a07d529 Implement read buffering in streams.
Eliminate similar code from network.c.
Implement fgets equivalent at the streams level, which can detect
the mac, dos and unix line endings and handle them appropriately.
The default behaviour is unix (and dos) line endings.
An ini option to control this behaviour will follow.
# Don't forget to make clean!
# I've done some testing but would appreciate feedback from
# people with scripts/extensions that seek around a lot.
2002-09-23 01:47:04 +00:00
Ilia Alshanetsky
e489ee946e Fixed bug #19395 2002-09-22 18:30:38 +00:00
Sander Roobol
90407dbf3e Changing the magic_quotes_gpc setting has no effect at USER level
# this partially fixes the #19526 shit
2002-09-20 18:07:48 +00:00
Colin Viebrock
14a6cc8847 Change phpinfo() to use CSS styling instead of HTML code.
It doesn't render as nicely as it used to on older browsers, but it
does result in smaller files, and opens the door to using your own CSS
to style it differently.

There is a patch to Zend/zend_ini.c, but I don't have enough Karma, so
Derick has the patch.
2002-09-19 21:57:25 +00:00
Zeev Suraski
3ae3eb06e9 Fix connection_status() 2002-09-19 15:54:23 +00:00
Zeev Suraski
76312b4508 another startup initialization fix - only ISAPI and CGI SAPI's tested,
minor compile buglets might occur in other SAPIs, but should be trivial
to fix...
2002-09-18 21:57:42 +00:00
Wez Furlong
ff7bece5bb Tidy up some user stream code.
Add a small test case (not yet complete).
2002-09-18 10:15:40 +00:00
Zeev Suraski
31429c60db Call zend_post_startup() - use local copies of the function, class and
constant tables in the startup thread
2002-09-17 09:07:10 +00:00
Stefan Esser
714eb8069a made new ssl activate function the default. 2002-09-12 21:52:09 +00:00
Anantha Kesari H Y
d3642b5488 NetWare related changes/modifications 2002-09-11 09:30:01 +00:00
Anantha Kesari H Y
3313593ff3 NetWare related changes/modifications 2002-09-09 12:03:36 +00:00
Anantha Kesari H Y
3798528753 NetWare related changes/modifications 2002-09-09 11:43:50 +00:00
Anantha Kesari H Y
1b18be126d NetWare related changes/modifications 2002-09-09 11:31:03 +00:00
Anantha Kesari H Y
1e09610f45 NetWare related changes/modifications 2002-09-09 11:23:11 +00:00
Anantha Kesari H Y
fa94fc6384 NetWare related changes/modifications 2002-09-09 11:17:40 +00:00
Anantha Kesari H Y
e4b9df9585 NetWare related changes/modifications 2002-09-09 10:56:28 +00:00
Stefan Esser
cbf5e3ca06 Added possibility to reuse an old SSL session id.
Ugly but needed for f.e.: debians ftpd-ssl
2002-09-08 22:26:11 +00:00
Yasuo Ohgaki
71fb0299d1 Added missing charset. 2002-09-08 01:06:29 +00:00
Yasuo Ohgaki
b83255aab0 Fix last commit. This line isn't supposed to be replaced. 2002-09-08 00:27:05 +00:00
Yasuo Ohgaki
17e0d9c642 MFB 2002-09-07 21:04:14 +00:00
Wez Furlong
3df412cf9b Fix a couple of bad pointer indirections (oops).
Lets stick to a single category of "http" for the "user_agent"
context override.
2002-09-07 20:58:30 +00:00
Wez Furlong
759a0068aa Tag user streams as being URLs, so that safe mode restrictions
will come into play.
2002-09-07 18:59:18 +00:00
Hartmut Holzgraefe
431b903e97 WebDAV MKCOL can have post data body, see rfc2518 8.3.1 2002-09-07 17:48:51 +00:00
Anantha Kesari H Y
8b8f1e0590 NetWare related additions/modifications 2002-09-05 14:25:07 +00:00
Stefan Esser
27e2bc2f55 This 2 lines should have been removed when the header() code was rewritten. 2002-09-04 20:27:35 +00:00
Sebastian Bergmann
419321979d Don't build ext/overload with Zend Engine 2. 2002-09-04 13:55:52 +00:00
Rui Hirokawa
7678ada2b8 --enable-mbstr-enc-trans is abolished to prevent some problems about POST/GET/Cookie variables. the same functionality is controllable in php.ini option mbstring.encoding_translation (default:Off). 2002-09-03 05:18:20 +00:00
Markus Fischer
f07b724620 - Enable strcoll() for win32 build
# Maybe I'm missing something. PHP has strcoll() since 4.0.5 but HAVE_STRCOLL
# was always only available under Unix, no one activated it for Win32 since
# then?
#
# Test to show it works:
# <? $a=array("a", "z", "ä"); setlocale(LC_ALL, "German"); usort($a, "strcoll"); var_dump($a); ?>
#
# Output:
# array(3) {
#   [0]=>
#   string(1) "a"
#   [1]=>
#   string(1) "ä"
#   [2]=>
#   string(1) "z"
# }
#
# Thanks to a comment found on the usort() page and to a dlcp post about a
# similar issue.
#
# Worth for a MFH for 4.2.3, anyone ?
2002-09-02 18:03:24 +00:00
Sebastian Bergmann
714c19fe66 Per discussion on #php.bugs (+1 from at least Derick and Jani), revert double_buffering. 2002-09-01 11:33:19 +00:00
Jan Lehnardt
d6497fc96e - reenable "no value" output. thanks to sebastian for pointing that out. 2002-08-29 10:24:02 +00:00
Jan Lehnardt
6676617693 - add phpinfo() support for CLI.
@phpinfo() support for CLI (jan)
2002-08-28 22:31:51 +00:00
Sebastian Bergmann
e8b50bc834 Fix ZTS build. 2002-08-25 22:17:56 +00:00
Marcus Boerger
a1f7bb12f1 use php_error_docref() 2002-08-25 18:45:02 +00:00
Marcus Boerger
8638bb882f Removed __output_handler as everybody seems against such implicit
behaviour. Instead supply error message.
2002-08-25 14:20:37 +00:00
Marcus Boerger
6d97e0c3eb Use zend_is_callable() instead of php_check_object_method_array() and
drop the latter. THX to Markus Fischer - i did not recognize this function.

@Expanded ob_start() to allow object parameters without methodnames and
@use default method __output_handler(). (Marcus)
2002-08-25 12:16:48 +00:00
Wez Furlong
95ffc663d9 Fix open_basedir. 2002-08-25 12:10:17 +00:00
Marcus Boerger
08ab630dc7 Reenable array(object,method) in ob_start() 2002-08-25 11:50:25 +00:00
Wez Furlong
e286b286ae Hopefully really fix #18022 this time. 2002-08-25 11:23:19 +00:00
Wez Furlong
6d2fb45328 Potential fix for Bug#18022:
Streams that are pipes on systems that HAVE_FLUSHIO should not be seeked
as is required for plain files on those systems.
2002-08-25 11:02:05 +00:00
Wez Furlong
509ad5ec0f Unify error messages. 2002-08-25 10:36:08 +00:00
Wez Furlong
c7be7b55d1 Add a "closing" parameter for filters to determine if a flush is the last
flush before the stream is closed.  This allows filters to finish a chunk
and write footers etc.
2002-08-25 10:26:58 +00:00
Wez Furlong
27adb75585 Remove php_stream_error as discussed with Rasmus.
Unify error messages for ext/ftp. (which was using php_stream_error).
2002-08-25 10:10:23 +00:00
Wez Furlong
2a71d7d5bb Respect safe mode setting when opening scripts and things for the ZE. 2002-08-23 17:39:20 +00:00
Zeev Suraski
a6e8e72372 Fix ob_gzhandler()'s handling of requests w/o compression but that do have
the Accept-Encoding header
2002-08-23 08:37:35 +00:00
Wez Furlong
3d8b6c2d52 Add a configure check to see if the seeker function in an fopencookie
uses off_t or the newer, more portable "fpos_t *".
The check could perhaps be more refined, as the test program will segfault
on older systems (like mine) that use off_t.
2002-08-22 22:28:19 +00:00
Wez Furlong
5718112088 Fix compile warnings under win32 2002-08-22 17:42:18 +00:00
Marcus Boerger
28970b9260 fix warning 2002-08-22 10:52:40 +00:00
Marcus Boerger
4c1f3dec65 fix php_error_docref parameters 2002-08-22 10:16:03 +00:00
Christian Stocker
55f3ec1af4 do not check for POST twice 2002-08-22 07:56:39 +00:00
Christian Stocker
9495fb9d7d @ - Added php.ini option "allow_webdav_methods" to allow handling of
@   WebDAV http requests within PHP scripts. (chregu)
# More methods (for DeltaV) will follow.
2002-08-22 07:48:23 +00:00
Marcus Boerger
5e7a9af062 full decopling of size parameters of ob_start() and internal buffer handlers
#intended behaviour is now fully implemented,
2002-08-21 03:04:17 +00:00
Marcus Boerger
b6cf2bb4bc make snprintf and f,g,G converions of snprintf/spprintf C99 complient 2002-08-21 01:11:50 +00:00
Marcus Boerger
b98c26382f Ignore double_buffering for ob_start(). 2002-08-21 01:00:56 +00:00
Marcus Boerger
8e10659648 Revert ob_start() defaults to 40K/10K until i find a better solution. 2002-08-20 23:23:25 +00:00
Wez Furlong
03b8214b9d Fix newly introduced leak in the debug build. 2002-08-20 22:08:55 +00:00
Wez Furlong
9d348ea800 Implement filter API for streams.
Filters can be stacked onto a stream; more details will follow in docs and
on php-dev.

Implement "string.rot13" filter

Allows the following script:

$fp = fopen("file.txt", "r");
stream_filter_prepend($fp, "string.rot13");

// File contents will be subject to a rot13 transformation before
// being output.
fpassthru($fp);
fclose($fp);
2002-08-20 20:47:47 +00:00
Marcus Boerger
2a443b2e77 Changed handling of output buffer sizes.
@Added php.ini option "double_buffering" that forces an additional first
@output buffer and improved handling of buffer sizes. (Marcus)
2002-08-20 19:49:37 +00:00
Wez Furlong
5f9a5a7c8e Remove php_stream_sock_set_blocking and replace with
php_stream_set_option which can be used in a similar way as ioctl()
to set options for streams.

Current options include buffering and blocking support.

o Buffer control is support for stdio based streams.
o Blocking/non-blocking is supported for stdio and socket based streams.
2002-08-19 22:59:10 +00:00
Zeev Suraski
bc906117bb Fix a few warnings 2002-08-19 20:47:55 +00:00
Marcus Boerger
8b30aeacd8 -use of php_error_docref
-some more information in ob_get_status()
2002-08-19 18:47:23 +00:00
Marcus Boerger
3408366776 -allow changing html_errors any time changing display_errors is already
-use sizeof for strftime call
-removed unused #define
-mention CODING_STANDARDS as documentation
2002-08-19 18:40:28 +00:00
Stig Venaas
fcc0380588 Added --enable-ipv6 and only look up AAAA in DNS when enabled 2002-08-17 13:56:39 +00:00
Stefan Esser
20693c1ad4 IE does not use quotes but now we are safe... 2002-08-17 11:48:21 +00:00
Stefan Esser
ecaa0a091a fixed the user supplied patch for bug #18792 2002-08-17 11:31:06 +00:00
Dan Kalowsky
6c22f90b4a Fix for bug #18792 submitted by t.bubeck@reinform.de
# talked this over with sterling and he believes it shouldn't break anything
# although there might be a need/desire to check for both ',' and ';'
2002-08-16 19:34:43 +00:00
Wez Furlong
2e4b6ef181 Fix a little leak. 2002-08-16 12:02:42 +00:00
Wez Furlong
c2cbae6dd3 Enhance Ilia's recent patch to query the wrapper subsystem to determine
if a filename is a URL and thus if safe-mode checks should be skipped.
2002-08-16 09:50:24 +00:00
Ilia Alshanetsky
a643ae656a Make https:// be exempt from safe_mode checks, just like http:// & ftp:// are. 2002-08-16 03:52:37 +00:00
Dan Kalowsky
1b8dd7f355 silencing some windows build warnings 2002-08-15 00:41:35 +00:00
Dan Kalowsky
4feff54879 Correcting as per discussion with Iliaa and Edin on efnet://#php.bugs 2002-08-13 14:56:50 +00:00
Dan Kalowsky
1027dfcdd1 Bug Fix #16113, as reflective of a php-dev convo between wez and iliaa 2002-08-13 14:39:03 +00:00
Marcus Boerger
968721bc55 allow target anchor only for docref parameter 2002-08-13 09:37:51 +00:00
Rasmus Lerdorf
3ffe4cb1ff bool not boolean 2002-08-13 04:37:28 +00:00
Rasmus Lerdorf
34362341e9 Use int, not integer. 2002-08-13 04:31:59 +00:00
Marcus Boerger
1134977baf fix for extension = ""
make php_verror available
2002-08-12 20:12:31 +00:00
Marcus Boerger
11611d0781 increase allocation chunks 2002-08-12 14:02:51 +00:00
Edin Kadribasic
553b7d27bf Export spprintf() so that extension can link properly on win32. 2002-08-12 09:07:26 +00:00
Preston L. Bannister
e1658ed6c4 Minor cleanups to path building and php*.ini search logic.
Made path_seperator string static (which solves the lookup problems Sebastian saw).
2002-08-12 05:37:03 +00:00
Wez Furlong
bcef712ad6 Properly implement TSRM parameters to the new log_error
function... (Thanks Marcus!)
Add a convenience macro for importing a stream from a zval.
2002-08-11 14:29:01 +00:00
Wez Furlong
94be838dc1 More verbosity when activating SSL on a socket fails. 2002-08-11 11:25:24 +00:00
Wez Furlong
5a21ab42cb Introduce an error stack for wrappers, to help prevent multiple errors
and warnings (some of which are bogus) when there are problems opening
streams.
Implement sanity check on the mode used to open ftp and http connections.
This fixes Bug 12004.
2002-08-11 10:53:10 +00:00
Wez Furlong
1861f1bae3 Minor fix for html_errors=on in php_error_docref. 2002-08-11 09:52:06 +00:00
Wez Furlong
1144bdb04d remove obsolete TSRMLS_FETCH 2002-08-10 20:20:55 +00:00
Marcus Boerger
21903dfc7e corrected handling of internal output buffers
minor fixs
2002-08-10 16:12:36 +00:00
Sebastian Bergmann
7c08781d50 Fix ZTS builds. 2002-08-10 03:03:03 +00:00
Marcus Boerger
9c8ba935d6 Improved handling of output buffers (see news)\n#No trim for the string parameter... 2002-08-09 22:29:58 +00:00
Marcus Boerger
2e29e53e00 docref shall either be NULL or a reference to a manual page without an
extension or an external reference starting with 'http://'.
2002-08-09 21:57:03 +00:00
Wez Furlong
ccb5c84b6c Centralize some blocking socket related code.
# It's been a while since I wrote this!
2002-08-09 21:02:36 +00:00
James Cox
1ae29d455c @Copy() fixed to return 1 on 0 byte files. Patch by Ilia A <ilia@prohost.org>. 2002-08-09 00:33:06 +00:00
Marcus Boerger
e11e0b0ec0 No missleading 2002-08-08 22:11:24 +00:00
Marcus Boerger
976a91a55b Say FIXME to non function calls and non TSRM builds. Both will currentls
not show a default reference.
2002-08-08 19:36:49 +00:00
Marcus Boerger
88c385e817 rename php_error_func<n> to php_error_docref and support Wez idea
that solves ToDo requirement to point to PHP Manual in error messages.
2002-08-08 19:12:27 +00:00
Stefan Esser
6f822fdcb7 A full hard disk is no reason to leak memory... 2002-08-08 12:40:51 +00:00
Yasuo Ohgaki
6ad0dbf5fa Add some assertion 2002-08-08 03:08:54 +00:00
Marcus Boerger
e50228ab5b -new functions php_error_func<0> to support unified error messages
#read followup
2002-08-07 18:29:36 +00:00
Marcus Boerger
6d21c9465d Added php_ob_handler_used to check if a specific output handler is used
in c.
2002-08-05 18:54:53 +00:00
Marcus Boerger
abc7041ca2 -keep mimetype until sapi deactivation
-move NULL check for sapi_apply_default_charset to proper position.
2002-08-05 18:32:05 +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
Rasmus Lerdorf
c8bf165242 Yup, sizeof() includes the space for the \0 2002-08-03 14:09:56 +00:00
Marcus Boerger
de8c36dcaa -use const to clarify code
-fix tsrmls build (therefore rfc1867.c)
2002-08-02 10:22:31 +00:00
Rui Hirokawa
7527bf0c58 made sapi_register_treat_data() to support multibyte input encoding translation without MBSTR_ENC_TRANS and changed php_treat_data to php_default_treat_data. 2002-08-02 06:53:48 +00:00
Stefan Roehrich
f871a5b742 Fixed wrong usage of strncmp. 2002-08-01 21:12:09 +00:00
Marcus Boerger
be0a6f4949 - free mimetype and statusline early if no longer needed or in deactivation
#not setting them to NULL caused the segfault
2002-08-01 09:00:30 +00:00
Rasmus Lerdorf
7b9036cada Need room for the \0 here to avoid an overflow 2002-08-01 07:49:53 +00:00
Marcus Boerger
4e05dd7c1b -problem with CLI/mbstring/output buffering 2002-07-31 17:55:15 +00:00
Zeev Suraski
a842e12ad2 Fix for non-mbstring builds. Bad Yasuo! :) 2002-07-31 16:25:12 +00:00
Edin Kadribasic
8f94a8a744 First try to open php-SAPI.ini and if it fails fall back to regular
php.ini file. For example cli version of PHP will first try to open
php-cli.ini in the usual ini file search path and only if it fails
will it try to open php.ini using the same path.
2002-07-29 12:17:34 +00:00
Stefan Roehrich
6f786ebf3e Commit patch as discussed on LinuxTag and posted to php-dev in June.
Disables zlib.output_compression for scripts with image/ content-type
header (fixes bug #16109) and makes it possible to switch
zlib.output_compression during script execution before the headers are
sent.
@- zlib.output_compression is disabled for "image/" content-type
@  headers and can be changed during script execution. (Stefan)
2002-07-28 14:08:08 +00:00
Yasuo Ohgaki
92e542db27 Fixed some.php?a&b&c does not initilize $_GET['a'], $_GET['b'], $_GET['c']
when mbstr-enc-trans is disabled.
# There is a bug in php_mbstr_encoding_handler() alo, I'll fix it later.
2002-07-28 04:18:40 +00:00
Rui Hirokawa
fbbeaec630 fixed: output encoding translation by mb_output_handler() in ext/mbstring was not usable when Content-Type is set by header(). 2002-07-27 13:58:16 +00:00
foobar
2dbd41869c Allow setting post_max_size and upload_max_filesize in .htaccess files too 2002-07-25 17:31:34 +00:00
Stefan Esser
3e05678842 do not dtor empty elements 2002-07-25 09:33:26 +00:00
Stefan Esser
5b3ee5f27a break out if there is no data to work on. 2002-07-24 11:25:36 +00:00
Jason Greene
a64eceef59 Switch streams socket abstraction to use a timeval structure instead of an
integer to allow subsecond timeouts.

This supports the previous behavior of fsockopen()
Fixes bug #16261
2002-07-22 18:46:26 +00:00
Jason Greene
217ef0d115 Fix feof() on win32
Bug #18436
2002-07-19 20:34:35 +00:00
foobar
887e1ffe57 ws fix 2002-07-19 16:22:36 +00:00
Derick Rethans
9ae8c39bab - set_time_limit() now returns whether it succeeded in changing the time
limit.
2002-07-17 08:06:43 +00:00
Yasuo Ohgaki
f4f8726b9e Accoding to safe_mode.h, php_checkuid() has six modes. 2002-07-17 05:15:17 +00:00
Stefan Esser
11ac4e035c use Zend API to access llist count 2002-07-15 16:37:15 +00:00
foobar
02d3e99bf2 IF --disable-mbstr-enc-trans is used OR mbstring is compiled as shared
extension, these functions are not available.
2002-07-14 00:27:52 +00:00
foobar
6f10116237 Fix bug: #18285, php_checkuid() mangled the passed path. 2002-07-13 00:52:18 +00:00
foobar
c7a68b78a7 - Fixed bug: #18268. If pcre is build as shared extension, we can't use
php_pcre_replace() here.
- Cleaned up a bit.
2002-07-13 00:15:22 +00:00
foobar
ed58d3a235 - Added predefined constants for the upload errors.
- Removed the debugging error (not useful for end-users)
2002-07-12 01:49:58 +00:00
Derick Rethans
6819ee3624 - Fix for bug #18283
#- It doesn't work from within a script anyways
2002-07-11 19:38:08 +00:00
foobar
2afacbf1cf These two can not be set in script. (so that they would have any effect) 2002-07-08 06:51:41 +00:00
foobar
6a83870c49 Fix typo 2002-07-05 18:32:08 +00:00
Rui Hirokawa
ead78e9125 fixed shift_jis character corruption including 0x5c as second byte following a slash on uploaded filename. 2002-07-05 15:06:39 +00:00
Sebastian Bergmann
0e52055f70 Fix ZTS build. 2002-07-03 21:07:24 +00:00
Frank M. Kromann
720f4b8365 Added MBSTR_ENC_TRANS to allow compilation and linking under win32 2002-07-03 18:44:40 +00:00
Rui Hirokawa
bb21c40738 fixed shift_jis character corruption including 0x5c as second byte on uploaded filename. 2002-07-03 13:36:19 +00:00
Sascha Schumann
fee236fb80 fix typo 2002-07-03 10:47:16 +00:00
Sascha Schumann
9c876ea01a Add sapi_header_op interface which supersedes the sapi_add_header and _ex
calls.

Revert the change to the sapi_add_header_ex interface.

Fix various bugs:

1.  header("HTTP/1.0 306 foo");
    header("Location: absolute-uri");

    did not work in combination with several SAPI modules, because
    http_status_line was never properly reset.  And thus, all SAPI
    modules which looked at http_status_line ignored the changed
    http_response_code.

2.  The CGI SAPI did not send out the HTTP status line at all, if
    http_status_line had not been set explicitly by calling
    header("HTTP/1.0 200 foo");
2002-07-03 10:42:31 +00:00
Derick Rethans
d73eed9210 - No C++ comments 2002-07-01 18:52:30 +00:00
foobar
4b321b0430 Fix win32 build. 2002-07-01 09:00:00 +00:00
Sander Roobol
d325d07b1a Main script should not be parsed when (include|require)_once()'ed, #17720
# Derick, MFH?
2002-06-30 13:38:16 +00:00
Marcus Boerger
d96924ffc5 -xbuf_resize does not need to have return value 2002-06-26 21:03:28 +00:00
Derick Rethans
d812929d2f - Implement Andrei's request for disabling memory leak reporting in debug
builds.
#- Andrei: I can show you the logs :)
2002-06-26 19:43:46 +00:00
Marcus Boerger
302bfefac7 explain difference between sprintf, snprintf and spprintf
#before complaining snprintf is often used wrong:
#snprintf does not terminate the buffer but most people expect it
#that could be a security isuue at somewhere
2002-06-23 22:16:35 +00:00
Marcus Boerger
02ac908307 #some sentences about the functions 2002-06-23 22:12:22 +00:00
Marcus Boerger
db39a2efa7 -freeing memory for pbuf=NULL
#should have been one commit but to many versions during tests
2002-06-23 22:10:30 +00:00
Marcus Boerger
d3222bb5b7 -allow pbuf = NULL in case of NO MEMORY, too 2002-06-23 22:06:52 +00:00
Marcus Boerger
fd4d8d5450 -allways terminate buffer
-allow pbuf parameter to be NULL for buffer size calculation
2002-06-23 22:02:35 +00:00
Marcus Boerger
761e234a43 -unlimited php_printf 2002-06-23 00:57:01 +00:00
Marcus Boerger
76aa60d4e4 -compiler warning (missing data type) 2002-06-23 00:34:47 +00:00
Edin Kadribasic
2203ef1979 Made pgsql compile on win32 again.
All defines regarding libpq capabilities are kept in ext/pgsql/pgsql.dsp
where HAVE_PQESCAPE is already defined.
2002-06-21 13:11:47 +00:00
Derick Rethans
6869cb3f5a - Added a new parameter to the header() function which overrides the HTTP
response code.
@- Added a new parameter to the header() function which overrides the HTTP
@  response code. (Derick)
2002-06-21 09:31:21 +00:00
Edin Kadribasic
0af2ae718f No need to check for allow_url_fopen here.
#This closes two bugs which I cannot find right now courtesy our buggy bug
#database.
2002-06-19 00:31:30 +00:00
foobar
d2f2ed76d1 Use correct macro for boolean ini values. 2002-06-19 00:18:40 +00:00
Stefan Esser
028b25362b fix: appending the default charset to text/ content types never worked
fix: removed double free
2002-06-18 15:04:58 +00:00
Stefan Esser
28ad564c29 keep fingers away from already freed memory. 2002-06-18 12:57:09 +00:00
Sander Roobol
0c1718c614 Patch by Michael Sisolak <msisolak@yahoo.com> to make header() honor the
replace parameter. Closes #16458.
2002-06-18 10:16:36 +00:00
Markus Fischer
17b3ef47f3 - Fix builtin gets() emulation (hopefully). 2002-06-11 21:22:12 +00:00
Markus Fischer
4290da23d0 - Add missing Id tag. 2002-06-11 18:55:48 +00:00
Markus Fischer
709785a90a - Always \0 terminate data returned from _php_stream_copy_to_mem(). 2002-06-11 18:54:57 +00:00
Hartmut Holzgraefe
c39a3bc880 macro definition fixed, guess it was the usual kind of cut&past bug? 2002-06-11 09:36:48 +00:00
Jason Greene
c6a36d585b @Impelemented timeout functionality, and fixed error handling of fsockopen() on win32
Also fixed error handling on unix (micropatch)

Closes Bug #14740
2002-06-11 03:55:28 +00:00
Harald Radi
ecad1fbc5a pg_escape_* functions were not available on win32 due to a missing define
#if this breaks the build because the win32 pg libs don't export the functions
#we should consider implementing them somehow else
#some linuxtag work
2002-06-09 14:32:40 +00:00
Markus Fischer
0cd40c2808 - Since streams are always enabled, instead of just printing 'enabled' we tell
what streams are currently registered.
2002-06-08 10:25:44 +00:00
Sebastian Bergmann
874cdf43a6 Unbreak build by setting PHP_PREFIX to c:\php4 for now. 2002-06-07 15:30:13 +00:00
Sebastian Bergmann
49446bb216 Fugbix typo. 2002-06-07 15:24:03 +00:00
Stig Bakken
41e31645dd * fix SHLIB_SUFFIX_NAME define for Windows 2002-06-07 12:20:28 +00:00
Stig Bakken
40ab700677 @New constants: PHP_PREFIX and PHP_SHLIB_SUFFIX (Stig) 2002-06-07 12:19:26 +00:00
Stefan Esser
5956656864 - Stay always in buffer 2002-06-07 08:00:12 +00:00
Stefan Esser
23ceadfe2b fixed multiline header detection (':' is valid within following lines)
fixed fill_buffer to fill the buffer always completely
2002-06-05 13:35:34 +00:00
Stefan Esser
a06a3e1f7f fixing some crashbugs that can be triggered with bogus uploads. 2002-06-05 11:28:33 +00:00
Markus Fischer
b04656ad40 - Finish implementation of custom smtp port (introduces "smtp_port" ini config). 2002-06-02 17:13:48 +00:00
Derick Rethans
f3c71c43b0 - Don't issue a notice when no file was uploaded 2002-05-31 09:05:39 +00:00
Venkat Raghavan S
575e3682f5 NetWare related changes 2002-05-31 04:49:45 +00:00
Sebastian Bergmann
ae6b6359d7 Add HAVE_MBSTR_RU support for Win32. 2002-05-21 07:15:42 +00:00
Wez Furlong
50f7427e69 Protect C code with extern "C" 2002-05-20 01:32:48 +00:00
Sander Roobol
751cd67cc0 get_cfg_var("get_file_path") didn't work correctly when an alternative
php.ini _file_ was specified using -c
2002-05-19 14:45:31 +00:00
Edin Kadribasic
544694255a Added glob() support for windows. 2002-05-19 14:32:24 +00:00
Zeev Suraski
2260e1742d - Centralize html_puts() again
- Revolutionize phpinfo()'s speed
2002-05-13 08:46:24 +00:00
Zeev Suraski
2369533bf9 Remove redundant code (thanks to Jani for pointing that out) 2002-05-12 22:17:58 +00:00
Sascha Schumann
f866bdc368 Simplify even more 2002-05-12 15:30:44 +00:00
Sascha Schumann
5c4ae13670 Simplify white space handling in php_html_puts.
If we encounter a ' ', we will look for the next non-' ' and set p
accordingly.
2002-05-12 15:22:11 +00:00
Sascha Schumann
a769454d79 reenable php_html_puts 2002-05-12 14:48:22 +00:00
Rasmus Lerdorf
63e6666216 MTH - thought the code was slightly different in HEAD because of the
streams stuff, but it is exactly the same bug.
@ Safe-mode fix related to the safe_mode_include_dir feature (Rasmus)
2002-05-11 19:58:40 +00:00
Zeev Suraski
b9fd10786b Use portable #define 2002-05-11 13:49:44 +00:00
Zeev Suraski
bf97148978 Centralize html_puts() logic - php_html_puts() remains as an API wrapper 2002-05-11 12:41:33 +00:00
Zeev Suraski
77f41212f6 Removing HTMLization of ' ' wasn't ok, it didn't deal with series of spaces
properly.  Turn series of spaces into &nbsp;'s.
2002-05-11 12:17:53 +00:00
Zeev Suraski
19b7861d70 0 byte file uploads are valid, avoid choking on them 2002-05-11 11:58:16 +00:00
Zeev Suraski
5af649efbd Revert to the old php_ini.c, and reimplement the binary-path searching.
Should now also work under UNIX (CLI/CGI)
2002-05-11 03:41:17 +00:00
Edin Kadribasic
ffce791942 Added MD5 support for crypt() on Windows. 2002-05-10 04:58:05 +00:00
foobar
c241dc5c8b ws fix 2002-05-09 22:46:45 +00:00
Preston L. Bannister
3c8c01b475 Compute directory for temporary files once and use same directory for all subsequent calls. 2002-05-09 22:03:19 +00:00
Preston L. Bannister
0c7cfcda4f Detect when running under IIS and default force_redirect to zero. This This means an explicit php.ini setting is no longer required.
(NO extraneous whitespace changes this time (sigh)).
2002-05-09 21:18:26 +00:00
Preston L. Bannister
6de4f3a459 Add check for php.ini in same directory as php.exe (or equivalent executable that loaded php4ts.dll). Check is done before looking in the Windows directory. This allows distinct php.ini files when different applications using PHP are installed on the same system. Should be backwards compatible.
Note that checking for in CWD php.ini may be a security risk(?), and can now be made compile-time configurable by removing a single #define.

(This time with tabs for leading indent).
2002-05-09 20:34:53 +00:00