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
Markus Fischer
f9936a8459
- Fix proto.
2002-06-10 10:28:33 +00:00
Andi Gutmans
fc059f5e40
- Fix typo
2002-05-23 14:28:14 +00:00
Derick Rethans
c37d2a97ac
- Fix errormessage and whitespace
2002-05-23 07:08:25 +00:00
Yasuo Ohgaki
b768cf0322
Added 4th parameter to specify enclosure character. Patch by Dean Richard Benson <dean@vipersoft.co.uk>
...
Spit more meaningful error messages when delim and/or enclosure char is null.
2002-05-23 07:03:43 +00:00
Rasmus Lerdorf
93af4bdfb7
Change safe-mode rule for rmdir() to match unlink() - allow is target
...
is opened by caller or in a directory owned by caller
@ Minor fix to rmdir() under safe-mode (Rasmus)
2002-05-12 15:59:42 +00:00
jim winstead
51e2ea5ed2
fix problem with mkdir() on freebsd
2002-05-06 17:31:22 +00:00
Sascha Schumann
4378214b80
Make this code work on compilers which don't consider the address
...
of a variable on the stack available at compile time.
2002-05-04 17:12:26 +00:00
Sebastian Bergmann
eacad68c68
Fix ZTS build.
2002-04-30 04:27:52 +00:00
Wez Furlong
760573695c
Implement user-space funtions to operate on stream contexts.
2002-04-30 00:28:24 +00:00
Wez Furlong
e1d0a14790
Implement stream context and status notification system.
...
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Zeev Suraski
385b233040
Fix gzip/bz2 builds for Windows
2002-04-05 11:51:43 +00:00
Wez Furlong
2539cbc74c
Phase 3 of OO wrapper cleanup
...
# What was phase 2?
2002-03-28 00:49:00 +00:00
Markus Fischer
341af63328
- Use proper macros for php_stream_cast() return values ( fixes #16211 ).
2002-03-21 22:05:40 +00:00
Hartmut Holzgraefe
b00d9a5b2c
added fnmatch() and glob() functions
...
could someone please check if i got the virtual dir stuff right?
2002-03-21 19:18:13 +00:00
Wez Furlong
a662f012bb
Convert the gzfile related functions into aliases for their equivalents
...
in ext/standard/file.c, so a gzopen()ed file pointer can be used in
fread, fseek etc.
Improved behaviour of zlib stream.
Moved passthru code into streams.c
# I'm not happy about BG(mmap_file)
Nuked gzgetss_state as no longer needed.
2002-03-21 01:11:52 +00:00
Wez Furlong
3dbde95896
Make state parameter of php_strip_tags passed by reference.
...
Move state tracking to stream structure.
2002-03-20 14:38:13 +00:00
Wez Furlong
659a071e3d
Streams are all tracked as resources now.
...
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong
14a3911866
fix for bug #16168
2002-03-19 17:49:02 +00:00
Wez Furlong
6abe71bebc
s/fgetwrapperdata/file_get_wrapper_data/
2002-03-19 13:33:07 +00:00
Wez Furlong
c9d5e13738
TSRMLS related work on streams, as discussed with Zeev.
...
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Zeev Suraski
73e79322ba
Fix the build and all of the outstanding VC++ warnings
2002-03-18 08:05:28 +00:00
Wez Furlong
0895998bef
s/get_file_contents/file_get_contents/
2002-03-16 16:52:24 +00:00
Wez Furlong
201446c2b5
Ooops.
2002-03-16 16:14:56 +00:00
Wez Furlong
0447327118
Implement get_file_contents() as discussed (briefly!) by myself, Derick
...
and Sterling on php-dev some months ago.
It returns the file contents as a string, and uses mmap if possible.
2002-03-16 16:06:18 +00:00
Wez Furlong
636829345e
Allow php_stream_copy_to_stream to do nothing when used with code
...
that calculates a max length of zero. (Thanks again Marcus).
2002-03-16 02:48:35 +00:00
Wez Furlong
52982c422e
This should help with some build problems/warnings under win32.
...
Someone still needs to add the streams.c file to the MSVC
project/workspace though (there are so many that I don't really know
what I am doing :-).
2002-03-16 02:33:00 +00:00
Wez Furlong
a184f5d1d3
* formatting, plus remove some old fopen wrappers
2002-03-16 01:34:52 +00:00
Wez Furlong
0f65280cb5
New PHP streams...
2002-03-15 21:03:08 +00:00
Sebastian Bergmann
90613d2282
Maintain headers.
2002-02-28 08:29:35 +00:00
Markus Fischer
1e2b854bba
- mkdir(): made second (mode) parameter optional, default to 0777
...
switched to zend_parse_parameters().
# Added vim 'noet' setting
2002-01-11 10:44:24 +00:00
Derick Rethans
e5c08b815f
- Added open basedir checks to file functions. (Patch by
...
Christoph Kassen <chkassen@chkassen.de>)
2001-12-21 08:04:21 +00:00
Sean Bright
25058db066
Use memset() instead.
2001-12-21 03:50:07 +00:00
Sean Bright
33730ca2b9
Initialize variable to avoid bogus data and possible segfault.
2001-12-21 03:10:11 +00:00
Sean Bright
0ca4f69d31
Switched some functions to use zend_parse_parameters, cleaned up some
...
unused variables and some whitespace work.
2001-12-21 01:53:25 +00:00
Sebastian Bergmann
38933514e1
Update headers.
2001-12-11 15:32:16 +00:00
Hartmut Holzgraefe
94737d086f
proto fix
2001-12-07 07:27:00 +00:00
Hartmut Holzgraefe
c1626365f9
proto fixes
2001-12-06 18:59:22 +00:00
Sterling Hughes
886ad91adf
Make the length parameter to fgets optional (defaults to 1024)
2001-12-04 19:40:48 +00:00
foobar
fc3906e93a
WS fix
2001-11-18 03:34:23 +00:00
Sterling Hughes
42b9349d8b
Many other reasons that setvbuf can fail than "wrong arguments", returning
...
false should be enough
2001-11-14 12:57:06 +00:00
Jeroen van Wolffelaar
5ccdb1d352
Fix all (at least, I tried to catch all) proto's in file.c
2001-11-11 20:33:27 +00:00
Jeroen van Wolffelaar
788b1552a7
Add warning when set_file_buffer() fails
2001-11-11 19:42:31 +00:00
Derick Rethans
88c6758d4e
- Fixing this bad idea
2001-11-10 18:06:28 +00:00
James Moore
4f78737000
Fix apache win32 dso build.
...
(This is untested on linux but shouldnt break anything)
2001-11-10 17:24:02 +00:00
foobar
f73ee14bd9
Check that realpath is available. Bug: #9469
...
# TSRM still uses it without checking. I can't fix that.
2001-10-23 11:14:51 +00:00
Sascha Schumann
a92fa9b2bc
Either sizeof(struct stat) or sizeof f_stat, but not sizeof stat.
2001-10-13 23:43:49 +00:00
Derick Rethans
62fb3d63c5
@- Added mmapfile(), read a file into a variabele with mmap (Ilia A, Derick)
...
- Added mmapfile(), read a file into a variabele with mmap (Patch by:
Ilia A. <ilia@prohost.org>)
2001-10-07 18:34:44 +00:00
Jeroen van Wolffelaar
c033288573
Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know.
2001-09-25 21:58:48 +00:00
Derick Rethans
78747bd2df
- Don't wrap lines... this is annoying while coding.
2001-09-09 13:29:31 +00:00
Sterling Hughes
c53f80fb23
1) update to the ZEND_NUM_ARGS() and Z_*_P{0,2} macros
...
2) minor ws improvements, removing unecessary error checking logic, and
making the error messages a bit nicer looking
2001-08-17 09:08:03 +00:00
Sterling Hughes
8300abe367
Removed select(), fd_set(), etc. (wasn't present in the first place, and
...
these are implemented in the sockwasn't present in the first place, and
these are implemented in the sockets extension))
2001-08-15 05:21:43 +00:00
Zeev Suraski
c0404f4631
Whitespace
2001-08-11 17:03:37 +00:00
Sascha Schumann
23b9300fd1
more tsrm cleanup
2001-08-06 03:50:52 +00:00
Sascha Schumann
373b3e101e
more tsrm cleanup -- output.c is not doing any fetches anymore
2001-08-05 15:55:43 +00:00
Zeev Suraski
1159c84ab7
- TSRMLS_FETCH work
...
- whitespace fixes
2001-08-05 01:43:02 +00:00
Sean Bright
d789d45a2e
WS Pollution
2001-08-04 13:47:44 +00:00
Sean Bright
fff883689e
Don't allocated quoted strings unless we are in a META tag.
2001-08-04 12:36:51 +00:00
Zeev Suraski
b1de7fc900
More TSRMLS_FETCH annihilation. Enough for today...
2001-07-31 07:09:49 +00:00
Zeev Suraski
bc42c37513
More TSRMLS_FETCH work. Got it under 400 now.
2001-07-31 06:28:05 +00:00
Zeev Suraski
aa1772ca72
More TSRMLS_FETCH annihilation
2001-07-31 05:44:11 +00:00
Zeev Suraski
c43806f415
Zend compatibility patch
2001-07-30 08:24:42 +00:00
Zeev Suraski
797a079a95
More TSRMLS_FETCH work, and a bit of cleanup
2001-07-30 06:18:13 +00:00
Zeev Suraski
7b1c400631
More TSRMLS_FETCH annihilation (Zend compatibility patch)
2001-07-30 04:58:07 +00:00
Zeev Suraski
d87cc976e1
Redesigned thread safety mechanism - nua nua
2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4
- Get rid of ELS_*(), and use TSRMLS_*() instead.
...
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Stanislav Malyshev
cdf0532ad3
Make read always 0-terminate strings
2001-07-16 15:44:36 +00:00
Zeev Suraski
94f5950438
Get rid of var_uninit()
2001-07-15 19:03:04 +00:00
Sean Bright
9d05cba6b8
This should be lower-cased per the documentation and previous
...
implementation.
2001-07-05 23:29:11 +00:00
Sean Bright
55fecbab76
Remove unused variable.
2001-07-01 14:07:44 +00:00
Sean Bright
1b0356e0f7
Fix for bug #11796 . Also, fixed a problem in get_meta_tags that required
...
NAME and CONTENT to be in that order. Meta tags with no CONTENT attribute
are now added to the array as empty strings. Meta tags with no NAME
attribute are ignored.
2001-06-30 20:07:12 +00:00
Rasmus Lerdorf
81e2cf03ac
Fix folding and clean up some extensions
2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d
vim-6 does folding - clean up a bunch of missing folding tags plus
...
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Rasmus Lerdorf
ae3dda8285
Fix bug #9526
2001-05-19 22:50:44 +00:00
Sascha Schumann
d5cfb03ac9
munmap() file in RSHUTDOWN, if PHPWRITE fails.
2001-05-18 23:38:46 +00:00
Sascha Schumann
0255bb01e4
Files should be shared among processes.
2001-05-18 17:48:43 +00:00
Wez Furlong
7a88deb402
expose streams to other extensions.
2001-05-12 21:48:39 +00:00
Jason Greene
c115a75544
Rewrote stat() and fstat() to be memory efficient, due to a recent
...
thread on php-dev.
Note: I added a macro that might have use in other instances, but for now
is included in php_filestat.h
2001-05-11 19:55:44 +00:00
Jason Greene
0ed93d71b2
@fstat() and stat() now return identical output by returning a numerical and
...
@string indexed array (Jason)
(Andrei's suggestion to still allow backwords compatibility.)
2001-05-11 01:47:46 +00:00
Andi Gutmans
4c823e8a89
- Change macros from V_ to VCWD_ because of AIX name clash
2001-04-30 12:45:02 +00:00
Wez Furlong
86c84da7c2
Discovered warn_not_available and used it.
2001-04-17 17:08:03 +00:00
Wez Furlong
57af70f707
Changes for streams. Added temporary fopenstream function to PHP so that
...
the streams can be tested.
2001-04-17 17:06:06 +00:00
Alexander Feldman
f0abfcc894
Fixed typo.
2001-04-15 19:03:12 +00:00
Alexander Feldman
531b8042ad
We shoud not fseek in a pipe and this caused a problem with popen and
...
fgets on the platforms where the buffer fix was applied (Solaris, FreeBSD).
Now the fseek is done only when the handle is of type fopen.
2001-04-15 18:42:50 +00:00
foobar
176f5847be
ws pollution removed.
2001-04-07 21:46:43 +00:00
Romolo Manfredini
01ac20050e
Added target ownership check in function copy for safe_mode operations
2001-03-23 09:30:51 +00:00
Alexander Feldman
397c76d787
Fixed a compatibility problem is some file functions (fgets, fputs, fread,
...
fwrite). The ANSI standard says that if a file is opened in read/write
mode, fseek() should be called before switching from reading to writing
and vice versa.
2001-03-11 10:08:27 +00:00
Sean Bright
5d3939ac39
Typo.
...
# I don't know where I got 4.02 from
2001-03-06 04:42:04 +00:00
Sean Bright
64ad839328
get_meta_tags now allows attributes that are not quoted as well as those
...
that are. It follows the HTML 4.01 specification for attribute values
outlined here -> http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2
2001-03-06 04:34:05 +00:00
Sean Bright
dca3c8753f
get_meta_tags now handles single quoted attributes as well as those that
...
are double quoted.
2001-03-05 00:20:41 +00:00
Andi Gutmans
eb6ba01d1c
- Fix copyright notices with 2001
2001-02-26 06:11:02 +00:00
Sascha Schumann
c2fb53bed7
Finish fopen-wrappers rename.
2001-02-23 22:07:16 +00:00
Sascha Schumann
47f7795594
Correctly check for the existence of the st_rdev field.
...
Note that this field is required to exist for SUSv3 conformance.
Submitted by: amra@us.ibm.com
PR: #9358
2001-02-21 07:18:28 +00:00
Egon Schmid
d27ebba71f
Wrong return type.
2001-02-16 13:13:52 +00:00
Thies C. Arntzen
8499b430cf
@- Fixed some modules to allow using output-buffering. (Thies)
...
i nuked all unneded calls to php_header() - i'm not too sure how we do
handle HEAD Requests as they were only detected via php_header(). but calling
php_header from a module makes output-buffering unusable.
NOTICE: there is some EBSDIC stuff in gd.c - i think it's obsolete.
2001-02-15 14:49:01 +00:00
Sean Bright
ef2e1a72cf
Fix for bug #4556
...
# This is pretty much a total rewrite of get_meta_tags using a simple
# handwritten tokenizer. It might be overkill, but it works.
2001-02-11 02:38:40 +00:00
Rasmus Lerdorf
4877d13ffa
What the heck is CUT? Assume someone meant UTC here. And fix a
...
warning.
2001-02-09 15:28:23 +00:00
Stanislav Malyshev
5af00138e9
Add utility function
2001-02-01 10:24:02 +00:00
Rasmus Lerdorf
83cf6629ec
@BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
...
BeOS patch from svanegmond@bang.dhs.org modified somewhat by Rasmus
2001-01-21 17:29:15 +00:00
Thies C. Arntzen
6b84fb1cde
fixed readfile() fd-leak.
...
guys, always remember that every function that *generates output* could cause a
bailout if ignore_user_abort is set to false (and the user _aborts_ the
connection). in this case a longjump will be performed and our function (in
this case readfile) will have no chance to clean-up. having said that it's a
good idea to register all opened files using REGISTER_RESOURCE - that way the
engine will make sure they get closed on request end.
2001-01-14 14:11:38 +00:00
Zeev Suraski
a85da45a66
Both thread-safe and thread-unsafe builds should be ok now
2001-01-13 23:49:44 +00:00
Zeev Suraski
86624dfad9
- Fix exec() bug
...
- Merge fsock and file globals
2001-01-13 13:59:22 +00:00
Zeev Suraski
338b9b0819
- Make the INI mechanism thread safe (fix necessary API changes from Zend)
...
- Make the Win32 non-TS configuration build again
2000-12-27 15:43:05 +00:00
Sascha Schumann
9815d5c94c
Signal an error condition, if write was unable to perform the complete
...
operation.
2000-12-22 19:26:02 +00:00
Sascha Schumann
663d426e74
NULL is a valid return value of mmap. Check against (void *) MAP_FAILED.
2000-12-22 16:39:01 +00:00
Sascha Schumann
3c9f50efaf
(php_file_copy) Use mmap to map the source file into our address space
...
and then simply write it out to the target file. That avoids switching
between user and kernel land too many times. If that does not work, we
fall back to the read/write method.
2000-12-22 16:34:11 +00:00
Hartmut Holzgraefe
9b1b253548
fgetcsv() will now work correct with empty fields in tab delimited files
...
# fix for bug #8258 and regression test
2000-12-14 14:18:36 +00:00
Stanislav Malyshev
0d02c7d337
Open files in binary mode - should fix readfile() on Windows
2000-12-12 17:42:53 +00:00
Sascha Schumann
4ada3dd3a0
Hardcode all functions which are mentioned in the Large File Support Spec
...
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
2000-12-07 12:09:38 +00:00
Daniel Beulshausen
2fefaba7b6
tsrm realpath implementation is fixed
...
@ Fixed realpath() in Virtual Directory mode (Daniel)
2000-11-22 10:08:25 +00:00
Stanislav Malyshev
fb8be26654
Fix crash ( #7802 )
2000-11-15 09:36:21 +00:00
Andi Gutmans
d0ec3df288
- Use CHECKUID_* #define's instead of cryptic numbers in php_checkuid()
...
- I did not test for validity of the actual php_checkuid() calls and there
- might be mistakes in the previous code.
2000-11-02 23:08:07 +00:00
Andi Gutmans
b25b80c147
- Change some estrdup()'s to estrndup()'s
2000-11-01 14:48:00 +00:00
Zeev Suraski
7ab46420be
mode_t fixes
2000-10-31 18:05:19 +00:00
Thies C. Arntzen
825457ae64
update my email.
2000-10-29 09:14:55 +00:00
Daniel Beulshausen
52e45f514b
use V_RENAME makro instead
2000-10-26 18:17:45 +00:00
Andrei Zmievski
f1dcb32c9f
Use zend_register_list_destructors_ex() instead.
2000-10-25 17:44:02 +00:00
Andrei Zmievski
7b4983c8f8
Mega-patch to get better resource information for modules.
...
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
* Switched register_list_destructors() to use
zend_register_list_destructors_ex() instead
* Updated all relevant modules to provide the resource type name
to register_list_destructors() call
* Updated var_dump() to output resource type name instead of number
@- Made resource type names visible, e.g. var_dump() and
@ get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Sascha Schumann
2e4ab68995
Automatic conversion might cause interpretation of 0xff as EOF, so we store
...
the result in an object of type int first.
Submitted by: melchers@cis.fu-berlin.de
2000-09-27 16:08:26 +00:00
Andi Gutmans
88b469203c
- Fix bug #5997
2000-09-12 04:13:21 +00:00
Andi Gutmans
824fc6a084
- Move php_open_temporary_file() out of file.c
2000-09-11 18:56:47 +00:00
Sascha Schumann
f45f6d788f
Kill a warning
2000-09-11 16:25:36 +00:00
Zeev Suraski
3115a0ccfe
Fix UNIX build
2000-09-09 12:02:31 +00:00