Commit Graph

1869 Commits

Author SHA1 Message Date
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