RE: [PHP-DEV] Streams Problems

2002-10-13 Thread Mike Robinson
. Regards Mike Robinson > -Original Message- > From: Ilia A. [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 11, 2002 10:11 PM > To: [EMAIL PROTECTED]; Wez Furlong > Subject: [PHP-DEV] Streams Problems > > > There are 3 streams related problems I've come ac

RE: [PHP-DEV] Streams Problems

2002-10-13 Thread Wez Furlong
n/slash.php on line 2 > > Regards > Mike Robinson > > > > -Original Message- > > From: Wez Furlong [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, October 12, 2002 1:40 PM > > To: Mike Robinson > > Cc: [EMAIL PROTECTED]; 'We

RE: [PHP-DEV] Streams Problems

2002-10-13 Thread Wez Furlong
Works for me using latest CVS. http://site.that.redirects";, "r"); fpassthru($fp); var_dump(stream_get_meta_data($fp)); ?> The var_dump shows that PHP is following the redirects. There used to be a bug like that, but it's been fixed for a couple of weeks now. How about posting a script th

RE: [PHP-DEV] Streams Problems

2002-10-13 Thread Mike Robinson
on > Cc: [EMAIL PROTECTED]; 'Wez Furlong' > Subject: RE: [PHP-DEV] Streams Problems > > > Works for me using latest CVS. > > $fp = fopen("http://site.that.redirects";, "r"); >fpassthru($fp); >var_dump(stream_get_meta_data($fp)); >

[PHP-DEV] Streams Problems

2002-10-12 Thread Ilia A.
There are 3 streams related problems I've come across today while using CVS code. First it seems that sending of binary data in excess of 8k causes some of the data not to be sent. This can be easily replicated with the following test code: According to fwrite() output all the data has been w

[PHP-DEV] Streams: Further considerations

2002-10-04 Thread Sascha Schumann
Streams' gets function does not work with stdio, because it uses fread(3) instead of fgets(3). Like fill_read_buffer earlier, fread(3) does not return, unless an error occurs or the amount of data has been read completely. It is basically impossible to implement an _efficient

Re: [PHP-DEV] Streams-Change ?!

2002-10-03 Thread Stefan Esser
On Thu, Oct 03, 2002 at 01:54:46PM +0200, Marcus Börger wrote: > There are problems especially in the streams seeker function at least. > > marcus Problem was in ext/ftp. Thanks anyway. Stefan -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/uns

Re: [PHP-DEV] Streams-Change ?!

2002-10-03 Thread Marcus Börger
At 13:20 03.10.2002, Stefan Esser wrote: >Hi, > >was there a change of the streams EOF functions? I added some >functionality to ext/ftp and must see that ftp_put uploads >one byte less than the filesize. There are problems especially in the streams seeker function at least. marcus -- PHP Dev

[PHP-DEV] Streams-Change ?!

2002-10-03 Thread Stefan Esser
Hi, was there a change of the streams EOF functions? I added some functionality to ext/ftp and must see that ftp_put uploads one byte less than the filesize. Stefan Esser -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Streams filter API

2002-08-20 Thread Andi Gutmans
At 10:47 PM 8/20/2002 +0100, Wez Furlong wrote: >Filters are created using: > php_stream_filter_create(char *filtername, char *filterparams, > int filterparamslen, int persistent TSRMLS_DC); > >filtername corresponds to the name used to register the factory; >if no exact match is found, it l

[PHP-DEV] Streams filter API

2002-08-20 Thread Wez Furlong
I've just comitted the streams filter API to CVS. The concept is that a series of filters can be applied to a given stream instance (as a doubly-linked-list); writing to the stream causes the buffer to pass through the filters from head to tail, before finally being written to the underlying strea

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
I'm checking it out now: I had 7.9.8 already downloaded, but I think I ran into a bug with the multi interface (it doesn't seem to actually follow HTTP redirects?! - and FOLLOWLOCATION is enabled). The good news is that I have an "alpha" curl stream/wrapper already working (except for not followi

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Sterling Hughes
> Sterling, > > Thats all I needed to know; I'll take a closer look at the library > and see if I can cook up a curl based stream/wrapper. > Is there a minimum version of the library (release preferred, of course) > that has this new multi-interface, or should I just use the CVS version > for now

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
Sterling, Thats all I needed to know; I'll take a closer look at the library and see if I can cook up a curl based stream/wrapper. Is there a minimum version of the library (release preferred, of course) that has this new multi-interface, or should I just use the CVS version for now? --Wez. On

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
Hi Shane, It's planned; depending on how productive I can be with my "PHP time", it might make it into PHP 4.3. --Wez. On 08/11/02, "Shane Caraveo" <[EMAIL PROTECTED]> wrote: > Wez, > I haven't looked into the streams stuff much, but have had it in the > back of my head a lot. Does the stream

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Sterling Hughes
> Hi Sterling, > > I'm not sure :-) > I'm 50/50 on integrating curl, because I know that it supports more features > than the current wrappers, but I'm not sure if it supports a rich enough > API to do the things that the streams API supports. > > So, I need your opinion: > > Does libcurl allow

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Rasmus Lerdorf
> On 08/11/02, "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote: > > > For readdir, I think we might need to implement a very simple > > > DAV client? Opinions please! > > > > Yeah, you simply send a PROPFIND request and parse the resulting XML > > reply. But I am not convinced this is all that useful.

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Shane Caraveo
Wez, I haven't looked into the streams stuff much, but have had it in the back of my head a lot. Does the streams implementation support 'filters' on streams? With this, whatever gets written to a stream would go through a filter prior to going across the wire. Reason I ask is that this wou

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Justin Erenkrantz
On Sun, Aug 11, 2002 at 03:49:45PM +0100, Wez Furlong wrote: > I thought that Apache 2 would result in a more widespread usage of > DAV (I'm not sure why I think that - something to do with subversion, > IIRC)? httpd-2.0 includes mod_dav in the stock distribution. -- justin -- PHP Development

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
Hi Sterling, I'm not sure :-) I'm 50/50 on integrating curl, because I know that it supports more features than the current wrappers, but I'm not sure if it supports a rich enough API to do the things that the streams API supports. So, I need your opinion: Does libcurl allow you to have progres

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
On 08/11/02, "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote: > > For readdir, I think we might need to implement a very simple > > DAV client? Opinions please! > > Yeah, you simply send a PROPFIND request and parse the resulting XML > reply. But I am not convinced this is all that useful. DAV really

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Rasmus Lerdorf
> Again, we need to determine file size and change time. > This seems quite easy - just do a HEAD request and parse the > relevant headers. > For readdir, I think we might need to implement a very simple > DAV client? Opinions please! Yeah, you simply send a PROPFIND request and parse the result

Re: [PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Sterling Hughes
> Hi all, > > I'm making an effort to clean up the streams code ready for release. > I've already commited some docs to the phpdoc repository that will > aid extension developers use streams. > > However, there is more to streams than simple file IO; the new > wrapper system provides a much rich

[PHP-DEV] Streams: FTP/HTTP wrapper gurus wanted

2002-08-11 Thread Wez Furlong
Hi all, I'm making an effort to clean up the streams code ready for release. I've already commited some docs to the phpdoc repository that will aid extension developers use streams. However, there is more to streams than simple file IO; the new wrapper system provides a much richer set of operat

Re: [PHP-DEV] streams and options

2002-04-19 Thread Wez Furlong
On 19/04/02, "l0t3k" <[EMAIL PROTECTED]> wrote: > Wez, > scream at me if it seems dumb, but in my never-finished extension, > each plugin accepts an option hash in the init callback which is used > to set up the object. the framework also stores this hash as an member > of the object, and th

Re: [PHP-DEV] streams and options

2002-04-19 Thread l0t3k
Wez, scream at me if it seems dumb, but in my never-finished extension, each plugin accepts an option hash in the init callback which is used to set up the object. the framework also stores this hash as an member of the object, and there are accessor methods to query the options. this keep

Re: [PHP-DEV] streams and options

2002-04-19 Thread Wez Furlong
Hi Derick, I'm leading up to be able to do this sort of thing, but want/need to discuss/brainstorm it here before I do much more to it. In a recent commit I added a context parameter to fopen. The context is intended to hold these kind of options, plus other data that is or will be relevant to

[PHP-DEV] streams and options

2002-04-19 Thread Derick Rethans
Hey Wez, I wonder if it is possible to set options after a stream has been opened. Something like: $fp = fopen ("crypt.des://secretfile.des", "r"); stream_option ($fp, "key", "very secret key"); And if it's there, is there an example in the source of it? regards, Derick -- PHP Development

[PHP-DEV] Streams

2002-03-16 Thread Marcus Boerger
Hi Wez, i tried the streams and memory streams now in ext/exif. What i do is check whether a stream is an stdio stream and if not copy it to a memory stream and work with that. But before going on using it i close/free the original stream. I tested with http:... and the wrapper has destroy set

Re: [PHP-DEV] Streams are here!

2002-03-16 Thread Sebastian Bergmann
Wez Furlong wrote: > gd: > functions that create images from files. > In particular, try creating from "wrapped" files over > http, ftp etc. ext/gd does not compile on Win32: gd.obj: error LNK2001: Unresolved external symbol: _php_stream_stdio_ops -- Sebastian Bergmann http://seb

Re: [PHP-DEV] streams crash

2002-03-16 Thread Sander Roobol
Hello Wez, You hack makes it work again. It doesn't crash anymore. Tnx, Sander On 2002.03.16 12:56 Wez Furlong wrote: > Sander, > > in main/main.c on line 576 there is a ZEND_REGISTER_RESOURCE > call. Can you comment out that line and try again? > I'd expect a leak instead of a crash now. >

Re: [PHP-DEV] streams crash

2002-03-16 Thread Wez Furlong
Sander, in main/main.c on line 576 there is a ZEND_REGISTER_RESOURCE call. Can you comment out that line and try again? I'd expect a leak instead of a crash now. We need a cleaner solution for this anyway :-/ --Wez. On 16/03/02, "Sander Roobol" <[EMAIL PROTECTED]> wrote: > Hello, > > Unfortu

Re: [PHP-DEV] streams crash

2002-03-16 Thread Sander Roobol
Hello, Unfortunately, it still fails. Configures & compiles fine, but crashes Apache. The backtrace is still the same. Sander On 2002.03.16 12:25 Wez Furlong wrote: > Hi Sander, > > I've added some asserts and removed a bogus php_stream_flush > call; update your streams.c let me know how you

Re: [PHP-DEV] streams crash

2002-03-16 Thread Wez Furlong
Hi Sander, I've added some asserts and removed a bogus php_stream_flush call; update your streams.c let me know how you get on :-) If this doesn't work, then it's probably to do with the resource management in main/main.c fopen_wrapper_for_zend :-/ --Wez. On 16/03/02, "Sander Roobol" <[EMAIL P

Re: [PHP-DEV] Streams are here!

2002-03-16 Thread Derick Rethans
Markus, please use tabs for indentation, and favor this: if (set) { function(); } above this: if (set) function(); this makes the PHP C source more consistent. Derick On Sat, 16 Mar 2002, Marcus Börger wrote: > To have image.c work i had to correct the php_stream_seek and php_strea

Re: [PHP-DEV] streams crash

2002-03-16 Thread Sander Roobol
Apache crashes when running _any_ script (even phpinfo(); segfaults). CLI works fine. Backtrace: #0 0x400e7476 in fflush () from /lib/libc.so.6 #1 0x402ff5b7 in php_stdiop_flush (stream=0x8169bc4) at /home/sander/php/head/php4/main/streams.c:500 #2 0x402fee39 in php_stream_flush (stream=

Re: [PHP-DEV] Streams are here!

2002-03-16 Thread Wez Furlong
Yes; I'm not happy with (long). Apparently, some systems have ptrdiff_t in malloc.h rather than stddef.h. I'll see what I can do, but it's tricky when working "blind" like this :-/ --Wez. On 16/03/02, "Stefan Roehrich" <[EMAIL PROTECTED]> wrote: > On 2002-03-16 01:11:11, Wez Furlong wrote: > >

[PHP-DEV] streams crash

2002-03-16 Thread sesser
following little script crashes now: it crashes in fflush() of libc and backtrace shows that its called by php_stdiop_flush, which is called from php_stream_flush, php_stream_free, Stefan -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/un

Re: [PHP-DEV] Streams are here!

2002-03-16 Thread Stefan Roehrich
On 2002-03-16 01:11:11, Wez Furlong wrote: > Can you tell me which include files are needed to correct > the build on your system? > Then I can fix it :-) Your fix to the .h file helped (even without the (long) change). Maybe we can use a configure check for ptrdiff_t like in ext/bcmath/libbcmat

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Marcus Börger
At 03:56 16.03.2002, Wez Furlong wrote: >I had thought about it, but it's making the streams abstraction do >too much; it will have to remember too much information, and what if >the data changes each time the stream is opened? YES it has to remember much and YES streams may change on next open -

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Wez Furlong
I had thought about it, but it's making the streams abstraction do too much; it will have to remember too much information, and what if the data changes each time the stream is opened? If you really need to seek around in a stream that might not support it, you should open a temporary stream (php

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Marcus Börger
What do you think about havin php_stream_seek emulate other methods than forward seeking? We could do this by opening the stream again if something before current position has to be read... That would allow using streams in every file based function! Of cause we should have flags that we are abo

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Marcus Börger
To have image.c work i had to correct the php_stream_seek and php_stream_getc calls. Seek caals had wrong parameter arragement - but nowhere else in code... getc see below... I changed both functions later. in php_stream_getc i return buf & 0xFF because otherwise i get 0xFFxx in return. in

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Wez Furlong
Can you tell me which include files are needed to correct the build on your system? Then I can fix it :-) --Wez. On 16/03/02, "Stefan Roehrich" <[EMAIL PROTECTED]> wrote: > Hello! > > On 2002-03-15 21:12:36, Wez Furlong wrote: > > Please please please test the following things in particular > >

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Wez Furlong
Hmmm, There is no configure option any longer; but a make clean followed by a reconfigure and rebuild should fix most problems like that. I think you might need to look at the php_stream_seek stuff in image.c in particular. --Wez. On 16/03/02, "Marcus Börger" <[EMAIL PROTECTED]> wrote: > SOR

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Philip Olson
> > Please please please test the following things in particular > > as I can't compile them or verify them here: > > I can't compile, because it complains about `ptrdiff_t' undeclared in > main/network.c. I think stddef.h or similar is needed in this file. this also affects --enable-sockets, p

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Marcus Börger
SORRY, had to reconfigure with --enable-php-streams now it compiles and works but getimagesize is broken for jpegs i will fix that tomorrow - think it's a problem of the latest features (argh) marcus At 22:53 15.03.2002, Marcus Börger wrote: >on cygwin (but i cannot finr any definition for th

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Marcus Börger
on cygwin (but i cannot finr any definition for them) ?! ext/standard/http_fopen_wrapper.o(.text+0x17f):http_fopen_wrapper.c: undefined reference to `SOCK_FCLOSE' ext/standard/http_fopen_wrapper.o(.text+0x280):http_fopen_wrapper.c: undefined reference to `SOCK_WRITE' ext/standard/http_fopen_wra

Re: [PHP-DEV] Streams are here!

2002-03-15 Thread Stefan Roehrich
Hello! On 2002-03-15 21:12:36, Wez Furlong wrote: > Please please please test the following things in particular > as I can't compile them or verify them here: I can't compile, because it complains about `ptrdiff_t' undeclared in main/network.c. I think stddef.h or similar is needed in this file

[PHP-DEV] Streams are here!

2002-03-15 Thread Wez Furlong
Well, PHP finally supports fopen("https://...";) :-) Please please please test the following things in particular as I can't compile them or verify them here: hyperwave: hw_new_document_from_file gd: functions that create images from files. In particular, try creating from "wrapped" files over

[PHP-DEV] streams support for interbase

2001-05-12 Thread Wez Furlong
Hi, Could someone with interbase test this patch that provides streams support? I would like to know the outcome of doing a regular compile (with no streams support) and a compile with --enable-php-streams before I commit. I'm just being overly cautious... --Wez. Index: ext/interbase/interb