php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #17784 fopen() 4th parameter not document
Submitted: 2002-06-16 10:02 UTC Modified: 2003-04-11 01:22 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: mfischer@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0CVS-2002-06-16 OS:
Private report: No CVE-ID: None
 [2002-06-16 10:02 UTC] mfischer@php.net
The 'zcontext' parameter is not documented.

It allows the reusing of an already stream (?), docs and examples should be really done.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 17:34 UTC] jan@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 [2002-07-14 08:20 UTC] wez@php.net
Just a quick note, because the docs haven't shown up on
the site yet, and I don't have time to resync my phpdoc
tree - the zcontext is for specifying tuning parameters
and callbacks.  I did post an example to php-dev a while
back.
I will properly document this stuff when my workload
decreases to something just below fever pitch.
 [2002-07-14 13:50 UTC] philip@php.net
Still open, I'll document it.
 [2002-07-16 18:07 UTC] philip@php.net
This has been briefly documented, I lack the knowledge to take it further.  Here's some related information:

 Re: [PHP-DEV] streams and options
  http://marc.theaimsgroup.com/?l=php-dev&m=101922976301407
Also, in NEWS:


  PHP now has a new stream system that allows it to 
  do some clever stuff with fopen() and fsockopen().  
  As a result:
  . URL wrappers natively supports https:// URLs
  . fsockopen() adds support for ssl:// and tls://
    connections via TCP/IP
  . copy($srcfilename, $destfilename) can now be used with 
    URL wrappers
  . zlib wrappers/streams can be used even on systems
    without fopencookie()
  . Added 'compress.bzip2://' stream and wrapper support.
  . Added user-space streams - it is now possible to define 
    a class in PHP code and register it as a URL wrapper.
  . Most extensions now support streams when passing files, 
    which means that those extensions will support URL
    wrappers. (Wez)

More related php-dev threads:

 Stream Filters and Interfaces (a bit long)
  http://marc.theaimsgroup.com/?l=php-dev&m=101924701219677
 
 URLs, fopen wrappers and RFC 2718
  http://marc.theaimsgroup.com/?l=php-dev&m=101915071800583

Am unassigning from self, remains open.
 [2002-07-17 04:56 UTC] cynic@php.net
whoa, kudos for the footwork, philip! :)

 [2002-07-26 14:11 UTC] wez@php.net
I still don't have time to properly document this, but I'm
pasting part of my email conversation with Philip here,
just in case someone else does get the time before I do.
Thanks very much to Philip for the effort in researching
this stuff!

Wez said:
> The concept is this:
> Sometimes it is useful to specify some more advanced tuning paramters
> for a file (or stream) before it is opened.  In the case of HTTP,
> it is also useful to be able to share context settings - the main
> thing here is to store cookies from one request and then use them
> for subsequent fopen("http://...") requests.
> 
> This concept was expanded to allow callbacks to monitor progress:
> you should be able to find more details on this on the marc archives -
> search for something like "stream progress notification"; this was
> implemented in response to someone requesting the feature for FTP,
> so adding FTP in there might help narrow the search.
> 
> The context functions were (re)named as follows:
> 
> stream_context_create()
> stream_context_get_options()
> stream_context_set_option()
> stream_context_set_params()
> 
> Context parameters have the following structure, much like an
> array, so I'll display it like an array:
> 
> context => array(
>    notification => callback for notification function
>    options => array(
>        http =>  array(optionname => optionvalue) // for http 
>        ftp => ftp wrapper options
>        ... => other wrapper options
>    )
> )
> 
> ATM, only the notification parameter has been set and no options
> for the other wrappers have been finalized, so it only makes sense
> to document that part of it right now.

And Philip said:
Feel free to add the information below to the bug 
report, I unassigned myself, and wrote all the 
information I knew into it.  See:

  http://bugs.php.net/bug.php?id=17784

Btw, that thread you speak of (stream progress 
notification" is here:

  RFC: stream notification handlers
  http://marc.theaimsgroup.com/?l=php-dev&m=101826854819192

Somehow I missed it.  Hopefully if you mention the 
stuff below in that report someone will document it.
Sorry I can't :(  Btw, this is some cool stuff!  I'm 
slowly understanding it.


 [2002-09-17 21:12 UTC] iliaa@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2002-11-06 04:00 UTC] wez@php.net
Still not documented (not sure why Ilia closed it - perhaps
by mistake).
 [2003-02-19 18:51 UTC] philip@php.net
With a little (lot) of help from Wez, I'll document this.
 [2003-04-11 01:22 UTC] pollita@php.net
Didn't know this bug was here till Philip asked me to document contexts..... fortunately I had just done it anyway :)

I love it when a plan comes together.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 18:01:28 2024 UTC