From:             terry at kryogenic dot co dot uk
Operating system: Debian
PHP version:      5.1.2
PHP Bug Type:     *Compression related
Bug description:  compressed data corruption when passed to another script via 
_REQUEST

Description:
------------
serializing, compressing and bzcompress/gzcompress an object then sending
to another script via _REQUEST seems to cause corruption. bzdecompress
returns error code -4. This following code works in php4 & php5.0.x but
not 5.1.2. gzcompress also returns a very similar error.



Reproduce code:
---------------
script a)
  $compStr = bzcompress(serialize($an_array));
  $base64Str = base64_encode($compStr);

  /* send this to script b like so:
   * http://somehost/script_b.php?object=$base64Str
   */

script b)
  $decStr = bzdecompress(base64_decode($_REQUEST['error']));
  $array = unserialize($decStr);

Expected result:
----------------
bzdecompress should succeed and after unserialization I should end up with
the original array from script a.

Actual result:
--------------
bzdecompress returns -4 (data error) and unserialize would of course fail
in the code above.

-- 
Edit bug report at http://bugs.php.net/?id=36526&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36526&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36526&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36526&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36526&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36526&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36526&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36526&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36526&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36526&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36526&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36526&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36526&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36526&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36526&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36526&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36526&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36526&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36526&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36526&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36526&r=mysqlcfg

Reply via email to