ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#43510 [Asn->Csd]: stream_get_meta_data() does not return same mode as used in fopen
by jani other posts by this author
Jul 31 2009 8:19PM messages near this date
#43510 [NEW]: stream_get_meta_data does not return same mode as used in fopen | #43510 [Opn->Asn]: stream_get_meta_data() does not return same mode as used in fopen
ID:               43510
 Updated by:       jani@[...].net
 Reported By:      dz at bitxtender dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Streams related
 Operating System: *
 PHP Version:      5.*, 6
 Assigned To:      jani
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-08-01 03:17:32] svn@[...].net

Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286613
Log: - Fixed bug #43510 (stream_get_meta_data() does not return same
mode as used in fopen)

------------------------------------------------------------------------

[2009-08-01 01:53:26] jani@[...].net

Remember to update version field when you test new versions..

------------------------------------------------------------------------

[2009-07-22 16:53:24] david dot zuelke at bitextender dot com

Test case: http://pastie.org/555185

------------------------------------------------------------------------

[2009-07-21 13:48:53] david dot zuelke at bitextender dot com

Problem still exists in 5.3.0.

Will try and come up with a proper .phpt and possibly a patch.

Can you reopen in the meantime?

------------------------------------------------------------------------

[2007-12-06 17:37:54] dz at bitxtender dot com

The simple reason why this must work is because one might want to 
serialize an object with a file pointer, and that can only be done by 
grabbing the meta data on sleep, and restoring the stream on wakeup.

But fopen() on an HTTP resource with r+ of course gives a warning that

the stream does not support writing!

I stumbled across this when someone pointed out that in Agavi, it's not

possible to cache a response that is streaming content from an HTTP 
resource. Check 
http://trac.agavi.org/browser/branches/0.11/src/response/AgaviResponse.c
lass.php?rev=2205#L55 for some "real-life" code that relies on this ;)

Also, it never hurts to have things working 100% properly ;)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/43510

-- 
Edit this bug report at http://bugs.php.net/?id=43510&edit=1
Thread:
Dz At Bitxtender Dot Com
jani
jani
jani
David Dot Zuelke At Bitextender Dot Com
pajoye
David Dot Zuelke At Bitextender Dot Com
jani
Dz At Bitxtender Dot Com
jani
Dz At Bitxtender Dot Com
helly
helly
Dz At Bitxtender Dot Com

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved