ID:               36720
 User updated by:  astur103 at hotmail dot com
 Reported By:      astur103 at hotmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows XP Pro SP2
 PHP Version:      5.1.2
 New Comment:

1.- To uncompress or compress the string use ...

http://www.3dspanish.org/bug_report/functions.txt

2.- To check how chunk_split cut wrongly the string check ...

http://www.3dspanish.org/bug_report/bad_cut_code.txt

3.- To check the SAME string cut rightly check ...
http://www.3dspanish.org/bug_report/good_cut_code.txt

4.- To know how is the inside string use function "uncompress_gz"
over "good_cut_code.txt"

Let me know if you need something more.

Thanks

Mapg


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

[2006-03-13 15:48:55] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



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

[2006-03-13 15:41:45] astur103 at hotmail dot com

Description:
------------
Sometimes, above all if memory is clean or the function is not loaded
in memory and has to do it, chunk_split cut a base64 string wrongly.

Later, works fine.

Reproduce code:
---------------
This is the used function:

function compress_gz($string, $level = "1") {
        $final_string = "";
        IF(!empty($string)) {
                $final_string = chunk_split(base64_encode(gzcompress($string,
$level)));
        }
        return $final_string;
        unset($string);
        unset($final_string);
}


Expected result:
----------------
I guess that something like this ...

---- LAST 3 LINES OF STRING ---

0r5uCiYhgApgyg3dCkwmwrauUwVphDguNk2YXJFHqWtjYBAbJjL9iS4X14tgmvRNyD6ef+L3Ve3y
5eLawo1+GJjEDVylt2st73hav2fuh90XV7iJbHVZexbnfz9M2d8Yszv8AKlPYUQ==

---- END ----


Actual result:
--------------
---- LAST 3 LINES OF STRING ---

0r5uCiYhgApgyg3dCkwmwrauUwVphDguNk2YXJFHqWtjYBAbJjL9iS4X14tgmvRNyD6ef+L3Ve3y
5eLawo1+GJjEDVylt2st73hav2fuh90XV7iJbHVZexbnfz9M2d8=
Yszv8AKlPYUQ==

---- END ----



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


-- 
Edit this bug report at http://bugs.php.net/?id=36720&edit=1

Reply via email to