From:             t_mueller_stolzenhain at yahoo dot de
Operating system: windows2003
PHP version:      5.2.6
PHP Bug Type:     IIS related
Bug description:  unserialze does not work, if a linebreak is inside the input 
string

Description:
------------
After updating PHP to version 5.2.6 on a windows 2003 server running under
IIS, it was not possible to update PEAR anymore. Each package created some
error messages like

Notice: unserialize(): Error at offset 1139 of 4783 bytes in
PEAR\Registry.php on line 1062


After putting the line

$data = str_replace("\15\12", "\12", $data);

before the unserialize-including line, the error message disappeared an I
was able to update PEAR again.

I asume, this is an IIS related issue, because on an other Computer with
PHP 5.2.5 (running on Win XP and Apache) are no error messages.

Reproduce code:
---------------
These are the lines 1058-1064 from /PEAR/PEAR/Registry.php including one
line with an fix

        $this->_closePackageFile($fp);
        $data = file_get_contents($this->_packageFileName($package,
$channel));
        set_magic_quotes_runtime($rt);
        $data = str_replace("\15\12", "\12", $data);//additional line with
fix
        $data = unserialize($data);
        if ($key === null) {
            return $data;
        }

Expected result:
----------------
no error message

Actual result:
--------------
e.g.

Notice: unserialize(): Error at offset 1139 of 4783 bytes in
PEAR\Registry.php on line 1062


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

Reply via email to