php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65173 file function with mongogridfs resource
Submitted: 2013-07-01 14:22 UTC Modified: 2013-07-14 19:44 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: erwan dot oger35 at gmail dot com Assigned:
Status: Not a bug Package: mongo (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
17 - 4 = ?
Subscribe to this entry?

 
 [2013-07-01 14:22 UTC] erwan dot oger35 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/mongogridfsfile.getresource#refsect1-
mongogridfsfile.getresource-description
---


Expected result:
----------------
public stream MongoGridFSFile::getResource ( void )
This method returns a stream resource that can be used with all file functions in 
PHP

so I expect to have new chunks in my fs.chunk collection when I use fwrite on a 
resource which was created by this function

Actual result:
--------------
Only the read file function run on a gridfs resource.

fwrite, fflush, fputs don't work ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-14 19:44 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2013-07-14 19:44 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The stream resource can only be used for writing. Files stored in GridFS are considered immutable, and we've since then updated the documentation to reflect this as well.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 12:01:29 2024 UTC