|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32006 convert_uudecode not always working
Submitted: 2005-02-17 01:23 UTC Modified: 2005-03-19 00:59 UTC
From: hoarau76 at free dot fr Assigned:
Status: No Feedback Package: Strings related
PHP Version: 5.0.3 OS: windows XP pro
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hoarau76 at free dot fr
New email:
PHP Version: OS:


 [2005-02-17 01:23 UTC] hoarau76 at free dot fr
I can't uudecode a string
it works under perl or winrar, but not with php 5.03

Reproduce code:

   $data = file_get_contents("");

   if (preg_match("/begin ([0-7]+) (.+)\r?\n(.+)\r?\nend/Us", $data, $part))
    	$file = convert_uudecode($part[3]);

Expected result:
I expect this script to work but it doesn't and gave me:

PHP Warning:  convert_uudecode(): The given parameter is not a valid uuencoded s
tring. in C:\a.php on line 7


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-21 19:16 UTC]
Your regular expression is obviously wrong, as it cuts '\n' at the end.
Change your code to 'preg_match("/begin ([0-7]+) (.+)\r?\n(.+)\r?end/Us", $data, $part)' and see that convert_uudecode() work fine.

 [2005-02-21 20:33 UTC] hoarau76 at free dot fr
I am sorry but my code is correct.
With your code it still doesn't work on Windows XP pro.

When I test on "Fedora Core release 1 (Yarrow)", it works (my code and your code)

So the probleme is specific to windows (XP)
 [2005-02-25 14:36 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-19 00:59 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 22:01:28 2024 UTC