php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58545 Please allow a string as input for mailparse_uudecode_all
Submitted: 2009-02-09 12:50 UTC Modified: 2009-02-16 19:04 UTC
From: message at ptd dot net Assigned:
Status: Open Package: mailparse (PECL)
PHP Version: 5.2.0 OS: RHEL4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: message at ptd dot net
New email:
PHP Version: OS:

 

 [2009-02-09 12:50 UTC] message at ptd dot net
Description:
------------
This extension supposed to be efficient. How come we cannot pass an already existing string to mailparse_uudecode_all() and instead required to pass a file resource?

If I already store the contents of an email message as a string $strRawMessage, I am then required to go through these unnecessary steps:

$fp = tmpfile();
fwrite($fp, $strRawMessage);

$arrData = mailparse_uudecode_all($fp); 
		
fclose($fp);

This is very inefficient.

Please allow us to pass a string instead of file resource.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-16 19:04 UTC] shire@php.net
this function accepts any stream type, so have you considered using something like php://memory or php://temp options so you don't go to disk? see: http://us.php.net/manual/en/wrappers.php.php. 

I believe the original intent here was probably to work on file sizes that exceeded the available memory, hence making streams the more efficient choice for processing.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC