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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: erwan dot oger35 at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 03:01:28 2024 UTC