Commit Graph

483 Commits

Author SHA1 Message Date
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Ard Biesheuvel
5232a5afea 64-bit bugsquash party 2004-06-16 23:57:25 +00:00
Ilia Alshanetsky
5b4dc50c01 Fixed possible memory leak inside popen(). 2004-05-14 16:12:03 +00:00
Ard Biesheuvel
81f05c18f5 Wordsize fixes 2004-02-25 20:16:27 +00:00
foobar
2a05750281 Fixed bug #27020 (Compile failure; sys/select.h: No such file or directory) 2004-01-25 06:09:36 +00:00
Ilia Alshanetsky
39b62f26cf Fixed bug #26967 (make various file operations return FALSE on error). 2004-01-19 18:40:39 +00:00
Moriyoshi Koizumi
abfda09eda Fix fgetcsv() to reflect the change on 4.3.5 behaviour. 2004-01-18 20:29:34 +00:00
Wez Furlong
09fb5dc1e6 Remove stale code from flock();
spotted by Hartmut.
2004-01-14 14:37:38 +00:00
Wez Furlong
cd4262eedd Fix #26772: fgets returns NULL instead of FALSE. 2004-01-14 14:25:01 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Ilia Alshanetsky
939a70a86d s/then/than/ Thanks Jani & Andi 2004-01-03 00:48:55 +00:00
Ilia Alshanetsky
6f7fe1dfa0 Fixed bug #26752 (Silent unterminated loop when length parameter for
fgets(), fread() and fgetss() is 0).
2004-01-02 00:57:23 +00:00
Moriyoshi Koizumi
93cc95e9db - fixes for compatibility. now fgetcsv() treats a null line to be a single
null component.
2003-12-24 21:30:43 +00:00
Sara Golemon
c56647833b Route mkdir()/rmdir() via wrapper ops.
Move current rmdir()/rmdir() code to plain_wrappers.c
Implement mkdir()/rmdir() in ftp:// wrapper
2003-12-13 04:07:18 +00:00
Sara Golemon
b1f8236b63 Route rename() via wrapper ops.
Move current rename() code to main/streams/plain_wrapper.c
Implement ftp/rename()
Implement userstreams/rename()
2003-12-12 23:06:42 +00:00
Moriyoshi Koizumi
35c3a7f525 Expose the macro globally 2003-12-10 06:08:39 +00:00
Wez Furlong
37f135ceef Add stream_socket_sendto and stream_socket_recvfrom which work very much
like sendto() and recvfrom() syscalls.
2003-11-29 21:46:50 +00:00
Ilia Alshanetsky
c722ab91ee Fixed bug #26355 (flock() doesn't initialize the wouldblock argument) 2003-11-24 01:42:43 +00:00
Moriyoshi Koizumi
e6feb47f00 Some clean-ups 2003-10-29 22:25:57 +00:00
Moriyoshi Koizumi
1085c08aa5 Add missing reinitialization call 2003-10-27 22:45:58 +00:00
Moriyoshi Koizumi
69dcdcb7c1 Fixed bug #26003 (fgetcsv() not binary-safe on null bytes) 2003-10-27 22:36:44 +00:00
Moriyoshi Koizumi
2c95c42404 Fix the macro to prevent it from falling over in a mess 2003-10-05 13:59:15 +00:00
Moriyoshi Koizumi
80edbeba2f Change fgetcsv() so that the second parameter is also optional. 2003-10-04 21:06:29 +00:00
Moriyoshi Koizumi
921e5b47c5 Fix fgetcsv() to correctly support international characters
# note: mblen() is not a mbstring function, but is part of the ANSI standard
# which is even supported by Microsoft's libc.
2003-10-04 02:51:19 +00:00
Stanislav Malyshev
e21669502b MF4: allow realpath() for win32 non-ZTS 2003-09-30 09:52:11 +00:00
Ilia Alshanetsky
dfe3f32ec6 Cleanup previous patch. 2003-09-10 01:07:01 +00:00
Ilia Alshanetsky
29e829fdcf Fixed bug #14049 (realpath() w/ZTS returns invalid results for non-existent
paths)
2003-09-10 00:22:10 +00:00
Sascha Schumann
436a07176c fix format strings 2003-08-28 16:49:57 +00:00
Ilia Alshanetsky
ed40ae2650 emalloc -> safe_emalloc 2003-08-11 23:16:54 +00:00
Ilia Alshanetsky
4d98e9ec97 Finalize the closing process of persistent streams. The current
behavior/API is as follows:

1) To close a persistent use php_stream_pclose(), it will close the stream
and remove it from the persistent list.

2) Inside PHP code only explicit fclose() will close persistent streams,
all other actions such as unset() or assigning a value to stream handle
will not.

3) Regular streams can still be closed by either fclose(), unset() or an
assignment of a value to the stream handler.
2003-07-29 18:26:34 +00:00
Ilia Alshanetsky
abe2afcf6e Make pclose() respect references. 2003-07-28 14:42:42 +00:00
Ilia Alshanetsky
cd4a281364 Fixed bug #24557 (make fclose() respect refcount on the resource). 2003-07-27 18:45:02 +00:00
Ilia Alshanetsky
a6fd611c5e Added array handling to file_put_contents()
More verbose error reporting mechanism.
Test case for file_put_contents().
2003-06-28 20:06:13 +00:00
Derick Rethans
f2acb42223 - Return number of bytes written instead of just TRUE. (Path by Paul Hudson,
hudzilla@php.net)
2003-06-28 08:21:02 +00:00
Marcus Boerger
f304458bdb Fix ZTS mode (hopefully all is working fine now again) 2003-06-14 19:30:42 +00:00
Marcus Boerger
9605db43ed Fix ZTS mode 2003-06-14 17:08:49 +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
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
foobar
9e71e39fa9 WS 2003-06-06 08:10:02 +00:00
Ilia Alshanetsky
32a0044a21 Fixed bug #23913 (make rename() work across partitions on *nix) 2003-05-31 00:32:45 +00:00
Sara Golemon
af5e2af752 Setup FG(default_context) in RINIT/RSHUTDOWN instead of fg_ctor/fg_dtor.
Frees context at right time without double freeing.
2003-05-21 21:36:51 +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
Sara Golemon
65d359d71a Fold 'options' parameter into wops->unlink method 2003-05-14 15:12:07 +00:00
Sascha Schumann
31dc62a905 MFB segfault fix 2003-05-14 08:27:48 +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
Hartmut Holzgraefe
e364d1f589 proto fix 2003-05-05 12:36:35 +00:00
Moriyoshi Koizumi
f4c9feb774 Added missing sanity check in fgetcsv() 2003-04-28 15:04:56 +00:00
Sara Golemon
8da5e8e48e Export constants to userland 2003-04-11 02:55:00 +00:00
Sara Golemon
87c5019dd2 Switch file_put_contents 'bool use_include_path' to 'int flags' to allow other options such as appending 2003-04-08 23:24:53 +00:00
Sara Golemon
41d4fcd0da Add context support to file_put_contents() and readfile(), convert readfile() to zend_parse_parameters usage, fix proto for file_put_contents() 2003-04-08 22:10:15 +00:00
Sara Golemon
1e853b74a3 Added context support to file() 2003-04-08 21:00:07 +00:00
foobar
a45b4258f0 file_set_contents -> file_put_contents 2003-04-08 14:12:52 +00:00
Sara Golemon
8001f2922c Add context support to file_get_contents 2003-04-08 00:02:47 +00:00
Ilia Alshanetsky
0e73275429 CS 2003-03-28 14:31:31 +00:00
Sterling Hughes
0a4282eabf fix segfault in file_set_contents() when the file could not successfully
be opened.
2003-03-21 22:22:15 +00:00
Wez Furlong
862586e376 CS fixes 2003-03-18 14:35:15 +00:00
Stig Bakken
0e6fca4f22 * email address change 2003-03-18 12:06:09 +00:00
Sterling Hughes
39b8f06f9b @ Add the file_set_contents() function, as a complement to the file_get_contents()
@ function. (Sterling)
2003-03-12 06:47:34 +00:00
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
Stefan Esser
af4aa97d1e Fixing functionicalls with variable number of parameters... 2003-03-06 20:31:20 +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
Hartmut Holzgraefe
050e86fde4 it is still to early in the morning for coding :( 2003-02-28 07:57:00 +00:00
Hartmut Holzgraefe
80d267e271 make sure that GNU extensions exist for fnmatch() 2003-02-28 07:52:23 +00:00
Wez Furlong
5def83df0b Move streams specific stuff from ext/standard/file.c -> ext/standard/streams.c
Move win32 select implementation into win32/.
Will update win32 build in a moment.
2003-02-27 22:23:39 +00:00
Wez Furlong
cfd8150b30 Add a generic meta data api for streams. 2003-02-27 19:10:24 +00:00
Wez Furlong
76ebaa6ee7 - Move https:// and ftps:// wrapper registration into the openssl module.
- Expose the http:// and ftp:// wrappers as PHPAPI
- Remove unused variables
2003-02-27 18:16:35 +00:00
Wez Furlong
fd61f69077 Another big commit (tm).
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
  some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
  (currently only supports OpenSSL, but could support other SSL toolkits,
  and other crypto transport protocols).

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

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

# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Derick Rethans
17acc55ad0 - Fix proto 2003-02-26 19:34:16 +00:00
Moriyoshi Koizumi
991da29849 Set fgetss() free from the length parameter 2003-02-25 20:12:18 +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
b44b0b80e0 Made fgetss() binary safe too 2003-02-24 22:39:47 +00:00
Wez Furlong
088e2692c3 MFB: Bunch of streams related fixes. 2003-02-24 21:40:23 +00:00
Ilia Alshanetsky
a3cb589b71 Fixed bug #22382 (fgetcsv did not handle \" correctly). 2003-02-24 03:13:25 +00:00
Ilia Alshanetsky
8908faa47f Revent previous patch, adding of file_write_content() was premature. 2003-02-22 20:35:22 +00:00
Ilia Alshanetsky
d2e2fbcc5b int/long change. 2003-02-22 20:33:11 +00:00
Moriyoshi Koizumi
d4e9d48b18 Fixed bug #21689 (fgetcsv suppresses some characters before a separator)
The fix is suggested by Masahiro Nakayama <masa@sfc.wide.ad.jp>

# is* functions expect their argument to be an integer in range of 0-255
2003-02-18 15:15:22 +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
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
63c95db648 Remove unused vars 2003-02-16 22:33:29 +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
Ilia Alshanetsky
53b7b0eb8c Merged the flags for the file() function into a single flag. 2003-02-10 22:26:53 +00:00
Wez Furlong
eefe0f1bb0 ZTS fix 2003-02-09 23:11:23 +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
Ilia Alshanetsky
8b5bc3ecd3 Added feature request #17983 (optional parameter to mkdir() that makes
directory creation recursive).
Fixed prototype for file() function.
2003-02-09 20:35:54 +00:00
Ilia Alshanetsky
4eae41915f Added feature request #14097 (option allowing file() command not to include
line endings in it's output. As well as another option, which allows blank
lines to be excluded from the output).
2003-02-09 20:05:13 +00:00
Ilia Alshanetsky
8a9e09a44a ARG_COUNT(ht) -> ZEND_NUM_ARGS(). 2003-01-21 14:56:40 +00:00
Ilia Alshanetsky
71e9f8cdd5 Removed pointless memory allocation checks. 2003-01-18 20:01:46 +00:00
Wez Furlong
7002a39f97 Fix potential problem for 64-bit architectures. 2003-01-18 14:10:22 +00:00
Derick Rethans
39aa3a5d98 - Fixed memleak in fscanf(). 2003-01-18 13:55:58 +00:00
Moriyoshi Koizumi
7fa0970567 Reverted because correct decision has not been made yet. 2003-01-11 23:05:19 +00:00
Moriyoshi Koizumi
dd2ad168e1 Reduced compiler warnings in ZE2 build 2003-01-11 22:17:37 +00:00
Ilia Alshanetsky
5413a66cbb CS fixes 2003-01-09 23:23:32 +00:00
Ilia Alshanetsky
3e5bbba351 Fixed a memory corruption that occurs when an unterminated " is encountered
this bug maybe be related to #21556.
2003-01-09 22:49:18 +00:00
Sara Golemon
7dae400063 Fixes to stream_get_wrappers() and stream_get_filters() handle hash table layouts better, plus some picune whitespace fixes 2003-01-05 22:24:49 +00:00
Ilia Alshanetsky
f99fa7170e Fixed a bug that would cause flock() to never set the 3rd argument.
CS fixes & switched to new parameter parsing API.
2003-01-03 18:33:28 +00:00
Anantha Kesari H Y
830298beb8 Modified for NetWare. 2003-01-03 14:37:42 +00:00
Sara Golemon
7b37272381 Added stream_get_wrappers() 2003-01-03 08:02:36 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Wez Furlong
bb640840c3 Remove cruft that opened a stream that was never closed in get_meta_tags().
(probably my fault).
Noticed by Philip Olson
2002-12-26 22:35:00 +00:00
Ilia Alshanetsky
7364e3b771 Fixed bug #12556, updated the test for this bug. 2002-12-05 20:01:19 +00:00
Ilia Alshanetsky
cc13af6a07 Fixed bug #20716. 2002-11-30 19:12:48 +00:00
Sterling Hughes
5c96f91123 don't use stupid constants, be smart, just read the line 2002-11-27 20:05:20 +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
c4e3bbb5d7 no C++ comments
#args sorry on that & thx jani
2002-10-29 13:26:44 +00:00
Marcus Boerger
083fc401fe fix overrun 2002-10-29 12:53:58 +00:00
Marcus Boerger
e1508efb45 fix compiler warning?: implement default mentioned by manual 2002-10-24 19:17:08 +00:00
Ilia Alshanetsky
30abd18322 Fixed a possible segmentation fault in file() function. 2002-10-22 18:07:11 +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
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
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
9b87199e2a Improve file().
Patch by Tal Peer <tal@php.net>
2002-10-18 16:55:47 +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
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
9d5bab5a0d EOF related fixes. 2002-10-05 10:59:35 +00:00
David Reid
9b10843481 Add more BeOS support... 2002-10-02 23:52:08 +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
8aae36aecb Add missing folding marker. 2002-09-28 13:04:47 +00:00
Wez Furlong
315e0a599b Implement stream_select() which works just like socket_select, but only on
streams.
@ - Added stream_select() which works like socket_select but only works on
@   streams returned by fopen(), fsockopen() and pfsockopen(). (Wez)
2002-09-27 23:42:38 +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
4c2a9c091b Remove an unused variable and a now-unused function. 2002-09-26 10:17:41 +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
Hartmut Holzgraefe
419efa6eeb symbolic constants for fnmatch flags added 2002-09-26 00:27:13 +00:00
Wez Furlong
0141e97052 Make these all work with persistent streams too. 2002-09-25 15:46:47 +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
4cdf8c7c36 Fix EOL markers for file() so that Mac EOL work correctly. 2002-09-24 02:46:38 +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
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
687312be41 Do not create the destination file, if opening of the source file failed
during copy().
2002-09-13 13:34:06 +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
Sterling Hughes
91df221ab7 @ Made the User-Agent that php's fopen wrappers send, configurable via
@ php.ini or via a stream context. (Sterling)

The stream context is untested, but it should/could work :)  Either way it
doesn't make the rest of the code bad. Wez -- please take a looksie for me
:)
2002-09-07 15:45:29 +00:00
Anantha Kesari H Y
8b8f1e0590 NetWare related additions/modifications 2002-09-05 14:25:07 +00:00
Marcus Boerger
6063c8c478 fix fwrite to no longer apply stripslashes on input string when
magic_quotes_runtime is set On.
2002-08-26 23:18:59 +00:00
Marcus Boerger
ba40963985 improoved error messages 2002-08-25 18:21:40 +00:00
Wez Furlong
5c6ad38c31 Prevent possible problems with include_path. 2002-08-25 12:09:57 +00:00
Marcus Boerger
149ad05b4f php_error_docref
#New conversion available at: http://docref.txt.marcus-boerger.de
2002-08-24 01:19:28 +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
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
Ilia Alshanetsky
1aea030cf2 Corrected if() syntax in previous patch. 2002-08-18 07:54:33 +00:00
Ilia Alshanetsky
d42dbfce8e Fixed a segmentation fault that would occur if an entry contained a
non-terminated enclosure. Bug #12556
2002-08-18 06:55:32 +00:00
Rasmus Lerdorf
b025bb1023 Missing proto 2002-08-13 05:08:47 +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
Yasuo Ohgaki
c528157123 Remove duplicated checks. 2002-08-08 22:59:41 +00:00
foobar
e3797ab76a Fixed bug: #16638. 2002-07-13 04:45:21 +00:00
Jason Greene
d907b2d525 @Fixed socket_set_timeout on win32 (Jason, Edin, Jani) 2002-07-10 15:23:47 +00:00
Andi Gutmans
b4146638f0 - Fix TSRMLS_* stuff 2002-07-08 18:29:54 +00:00
Derick Rethans
728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Derick Rethans
7b7608d630 - Fix for bug #15547 (Patch by Justin Garrett <usjgarrett@byu.edu>) 2002-07-02 06:16:35 +00:00
Hartmut Holzgraefe
303852b42e - fixed bug in enclosure handling (was still hardcoded to '"' in one place)
- added possibility to pass empty enclosure if you really don't want one
2002-06-18 12:16:27 +00:00