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/libbcmath, so we can avoid the (long) workaround.

  Stefan

-- 
Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
 http://www.roehri.ch/~sr/

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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:
  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/libbcmath, so we can avoid the (long) workaround.
 
   Stefan
 
 -- 
 Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
  http://www.roehri.ch/~sr/




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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_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 php_stream_seek i added code to make it much faster
 
 and i couldn't compile php_stdiop_read see diff
 
 marcus
 
 diff -u -w -r1.11 streams.c
 --- main/streams.c  16 Mar 2002 00:05:47 -  1.11
 +++ main/streams.c  16 Mar 2002 02:28:55 -
 @@ -132,7 +132,7 @@
  char buf;
 
  if (php_stream_read(stream, buf, 1)  0) {
 -   return buf;
 +   return buf  0xFF;
  }
  return EOF;
   }
 @@ -204,17 +204,19 @@
 
   PHPAPI int php_stream_seek(php_stream *stream, off_t offset, int whence)
   {
 +   static char tmp[1024];
 +
  if (stream-ops-seek) {
  return stream-ops-seek(stream, offset, whence);
  }
 
  /* emulate forward moving seeks with reads */
  if (whence == SEEK_CUR  offset  0) {
 -   while(offset--  0) {
 -   if (php_stream_getc(stream) == EOF) {
 -   return -1;
 -   }
 +   while (offset=sizeof(tmp)) {
 +   php_stream_read(stream,tmp,sizeof(tmp));
 +   offset -= sizeof(tmp);
  }
 +   if (offset) php_stream_read(stream,tmp,offset);
  return 0;
  }
 
 @@ -447,7 +449,7 @@
 
   static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
   {
 -   php_stdio_stream_data * ata = (php_stdio_stream_data*)stream-abstract;
 +   php_stdio_stream_data * data = 
 (php_stdio_stream_data*)stream-abstract;
 
  if (buf == NULL  count == 0)  {
  /* check for EOF condition */
 
 
 At 22:12 15.03.2002, Wez Furlong wrote:
 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
 http, ftp etc.
 
 pfsockopen()
 copy() - particularly with wrapped source/dest
 gzopen (and friends)
 gzfile
 
 If you have a system where HAVE_FLUSHIO is important,
 please let me know if plain files work correctly when
 switching between read and write.
 
 If you have things in Pear/PECL or a third party
 extension that used the old FP_XXX or php_file_le_fopen(),
 please contact me and I can help you update your code for
 streams (it's easy).
 
 I'll check back in a couple of hours to see if anyone
 has found show stoppers; otherwise I'll be signing off
 till the morning (it is Friday after all!)
 
 --Wez.
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[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
http, ftp etc.

pfsockopen()
copy() - particularly with wrapped source/dest
gzopen (and friends)
gzfile

If you have a system where HAVE_FLUSHIO is important,
please let me know if plain files work correctly when
switching between read and write.

If you have things in Pear/PECL or a third party
extension that used the old FP_XXX or php_file_le_fopen(),
please contact me and I can help you update your code for
streams (it's easy).

I'll check back in a couple of hours to see if anyone
has found show stoppers; otherwise I'll be signing off
till the morning (it is Friday after all!)

--Wez.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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.

  Stefan

-- 
Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
 http://www.roehri.ch/~sr/

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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_wrapper.o(.text+0x3b1):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x430):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x4d0):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x4e6):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x543):http_fopen_wrapper.c: 
undefined reference to `SOCK_FEOF'
ext/standard/http_fopen_wrapper.o(.text+0x567):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x6cf):http_fopen_wrapper.c: 
undefined reference to `SOCK_FEOF'
ext/standard/http_fopen_wrapper.o(.text+0x728):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x818):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x96b):http_fopen_wrapper.c: 
undefined reference to `SOCK_FCLOSE'

At 22:12 15.03.2002, Wez Furlong wrote:
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
http, ftp etc.

pfsockopen()
copy() - particularly with wrapped source/dest
gzopen (and friends)
gzfile

If you have a system where HAVE_FLUSHIO is important,
please let me know if plain files work correctly when
switching between read and write.

If you have things in Pear/PECL or a third party
extension that used the old FP_XXX or php_file_le_fopen(),
please contact me and I can help you update your code for
streams (it's easy).

I'll check back in a couple of hours to see if anyone
has found show stoppers; otherwise I'll be signing off
till the morning (it is Friday after all!)

--Wez.


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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 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_wrapper.o(.text+0x3b1):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x430):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x4d0):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x4e6):http_fopen_wrapper.c: 
undefined reference to `SOCK_WRITE'
ext/standard/http_fopen_wrapper.o(.text+0x543):http_fopen_wrapper.c: 
undefined reference to `SOCK_FEOF'
ext/standard/http_fopen_wrapper.o(.text+0x567):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x6cf):http_fopen_wrapper.c: 
undefined reference to `SOCK_FEOF'
ext/standard/http_fopen_wrapper.o(.text+0x728):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x818):http_fopen_wrapper.c: 
undefined reference to `SOCK_FGETS'
ext/standard/http_fopen_wrapper.o(.text+0x96b):http_fopen_wrapper.c: 
undefined reference to `SOCK_FCLOSE'

At 22:12 15.03.2002, Wez Furlong wrote:
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
http, ftp etc.

pfsockopen()
copy() - particularly with wrapped source/dest
gzopen (and friends)
gzfile

If you have a system where HAVE_FLUSHIO is important,
please let me know if plain files work correctly when
switching between read and write.

If you have things in Pear/PECL or a third party
extension that used the old FP_XXX or php_file_le_fopen(),
please contact me and I can help you update your code for
streams (it's easy).

I'll check back in a couple of hours to see if anyone
has found show stoppers; otherwise I'll be signing off
till the morning (it is Friday after all!)

--Wez.


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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, please fix soon i'm trying 
to test something ;))

philip


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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:
 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 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_wrapper.o(.text+0x3b1):http_fopen_wrapper.c: 
 undefined reference to `SOCK_WRITE'
 ext/standard/http_fopen_wrapper.o(.text+0x430):http_fopen_wrapper.c: 
 undefined reference to `SOCK_WRITE'
 ext/standard/http_fopen_wrapper.o(.text+0x4d0):http_fopen_wrapper.c: 
 undefined reference to `SOCK_WRITE'
 ext/standard/http_fopen_wrapper.o(.text+0x4e6):http_fopen_wrapper.c: 
 undefined reference to `SOCK_WRITE'
 ext/standard/http_fopen_wrapper.o(.text+0x543):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FEOF'
 ext/standard/http_fopen_wrapper.o(.text+0x567):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FGETS'
 ext/standard/http_fopen_wrapper.o(.text+0x6cf):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FEOF'
 ext/standard/http_fopen_wrapper.o(.text+0x728):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FGETS'
 ext/standard/http_fopen_wrapper.o(.text+0x818):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FGETS'
 ext/standard/http_fopen_wrapper.o(.text+0x96b):http_fopen_wrapper.c: 
 undefined reference to `SOCK_FCLOSE'
 
 At 22:12 15.03.2002, Wez Furlong wrote:
 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
 http, ftp etc.
 
 pfsockopen()
 copy() - particularly with wrapped source/dest
 gzopen (and friends)
 gzfile
 
 If you have a system where HAVE_FLUSHIO is important,
 please let me know if plain files work correctly when
 switching between read and write.
 
 If you have things in Pear/PECL or a third party
 extension that used the old FP_XXX or php_file_le_fopen(),
 please contact me and I can help you update your code for
 streams (it's easy).
 
 I'll check back in a couple of hours to see if anyone
 has found show stoppers; otherwise I'll be signing off
 till the morning (it is Friday after all!)
 
 --Wez.
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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
  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.
 
   Stefan
 
 -- 
 Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
  http://www.roehri.ch/~sr/
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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 php_stream_seek i added code to make it much faster

and i couldn't compile php_stdiop_read see diff

marcus

diff -u -w -r1.11 streams.c
--- main/streams.c  16 Mar 2002 00:05:47 -  1.11
+++ main/streams.c  16 Mar 2002 02:28:55 -
 -132,7 +132,7 
 char buf;

 if (php_stream_read(stream, buf, 1)  0) {
-   return buf;
+   return buf  0xFF;
 }
 return EOF;
  }
 -204,17 +204,19 

  PHPAPI int php_stream_seek(php_stream *stream, off_t offset, int whence)
  {
+   static char tmp[1024];
+
 if (stream-ops-seek) {
 return stream-ops-seek(stream, offset, whence);
 }

 /* emulate forward moving seeks with reads */
 if (whence == SEEK_CUR  offset  0) {
-   while(offset--  0) {
-   if (php_stream_getc(stream) == EOF) {
-   return -1;
-   }
+   while (offset=sizeof(tmp)) {
+   php_stream_read(stream,tmp,sizeof(tmp));
+   offset -= sizeof(tmp);
 }
+   if (offset) php_stream_read(stream,tmp,offset);
 return 0;
 }

 -447,7 +449,7 

  static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
  {
-   php_stdio_stream_data * ata = (php_stdio_stream_data*)stream-abstract;
+   php_stdio_stream_data * data = 
(php_stdio_stream_data*)stream-abstract;

 if (buf == NULL  count == 0)  {
 /* check for EOF condition */


At 22:12 15.03.2002, Wez Furlong wrote:
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
http, ftp etc.

pfsockopen()
copy() - particularly with wrapped source/dest
gzopen (and friends)
gzfile

If you have a system where HAVE_FLUSHIO is important,
please let me know if plain files work correctly when
switching between read and write.

If you have things in Pear/PECL or a third party
extension that used the old FP_XXX or php_file_le_fopen(),
please contact me and I can help you update your code for
streams (it's easy).

I'll check back in a couple of hours to see if anyone
has found show stoppers; otherwise I'll be signing off
till the morning (it is Friday after all!)

--Wez.


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.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 about to emulate
and it should be a feature that can be turned off or even better
one that can be enabled by function call

marcus

At 22:12 15.03.2002, Wez Furlong wrote:
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
http, ftp etc.

pfsockopen()
copy() - particularly with wrapped source/dest
gzopen (and friends)
gzfile

If you have a system where HAVE_FLUSHIO is important,
please let me know if plain files work correctly when
switching between read and write.

If you have things in Pear/PECL or a third party
extension that used the old FP_XXX or php_file_le_fopen(),
please contact me and I can help you update your code for
streams (it's easy).

I'll check back in a couple of hours to see if anyone
has found show stoppers; otherwise I'll be signing off
till the morning (it is Friday after all!)

--Wez.


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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_stream_fopen_tmpfile())
and then php_stream_copy_to_stream(src, tmp, PHP_STREAM_COPY_ALL)
to get a copy on disk.

When do you need to do this? Well, a general rule is when
php_stream_is(src, PHP_STREAM_IS_STDIO) is false.

--Wez.

On 16/03/02, Marcus Börger [EMAIL PROTECTED] wrote:
 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 about to emulate
 and it should be a feature that can be turned off or even better
 one that can be enabled by function call
 
 marcus
 
 At 22:12 15.03.2002, Wez Furlong wrote:
 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
 http, ftp etc.
 
 pfsockopen()
 copy() - particularly with wrapped source/dest
 gzopen (and friends)
 gzfile
 
 If you have a system where HAVE_FLUSHIO is important,
 please let me know if plain files work correctly when
 switching between read and write.
 
 If you have things in Pear/PECL or a third party
 extension that used the old FP_XXX or php_file_le_fopen(),
 please contact me and I can help you update your code for
 streams (it's easy).
 
 I'll check back in a couple of hours to see if anyone
 has found show stoppers; otherwise I'll be signing off
 till the morning (it is Friday after all!)
 
 --Wez.
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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 - you're right. Was just a quick idea while changing image.c, whether
or not i would get able to read more from tiff files.


If you really need to seek around in a stream that might not support
it, you should open a temporary stream (php_stream_fopen_tmpfile())
and then php_stream_copy_to_stream(src, tmp, PHP_STREAM_COPY_ALL)
to get a copy on disk.

Do we have a memory stream already? Anybody like this idea?


When do you need to do this? Well, a general rule is when
php_stream_is(src, PHP_STREAM_IS_STDIO) is false.

--Wez.

On 16/03/02, Marcus Börger [EMAIL PROTECTED] wrote:
  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 about to emulate
  and it should be a feature that can be turned off or even better
  one that can be enabled by function call
 
  marcus
 
  At 22:12 15.03.2002, Wez Furlong wrote:
  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
  http, ftp etc.
  
  pfsockopen()
  copy() - particularly with wrapped source/dest
  gzopen (and friends)
  gzfile
  
  If you have a system where HAVE_FLUSHIO is important,
  please let me know if plain files work correctly when
  switching between read and write.
  
  If you have things in Pear/PECL or a third party
  extension that used the old FP_XXX or php_file_le_fopen(),
  please contact me and I can help you update your code for
  streams (it's easy).
  
  I'll check back in a couple of hours to see if anyone
  has found show stoppers; otherwise I'll be signing off
  till the morning (it is Friday after all!)
  
  --Wez.
  
  
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php