ID:               45573
 Updated by:       [EMAIL PROTECTED]
-Summary:          unserialze does not work, if a linebreak is inside the
                   input string
 Reported By:      t_mueller_stolzenhain at yahoo dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         IIS related
 Operating System: windows2003
 PHP Version:      5.2.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




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

[2008-07-20 20:23:11] t_mueller_stolzenhain at yahoo dot de

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 this bug report at http://bugs.php.net/?id=45573&edit=1

Reply via email to