From:             
Operating system: Windows 2003
PHP version:      5.2.17
Package:          Apache2 related
Bug Type:         Bug
Bug description:' The memory could not be "read" ' when calling mb_eregi_replace

Description:
------------
>From time to time in the line / * dead line * /$str = mb_eregi_replace (
"U\\+([A-F0-9]{4})", "U+\\1", $str); apache error:

Application popup: httpd.exe - Application Error: The instruction at
"0x016657e9" referenced memory at "0x00000001" (sometimes 000100 or
000002). The memory could not be "read".



OR The instruction at "0x0165c37a" referenced memory at "0x6f647468". The
memory could not be "read".



If an error occurs at least once, it starts to appear each time you run
this line.

Write a short script that causes this error I could not.



At address 0x016657e9 located php_mbstring.dll (base address 0x01640000,
file version 5.2.17.17).







Test script:
---------------
function smartUtf8to1251($str) {

        mb_internal_encoding("utf-8");

        mb_substitute_character('long');

        /*dead line*/$str = mb_eregi_replace ( "U\\+([A-F0-9]{4})", "U+\\1",
$str);

        $str = mb_convert_encoding($str, 'windows-1251', 'utf-8');

        $str = preg_replace("~U\+([A-F0-9]{4})~ie", '"&#".hexdec("$1").";"',
$str);

        return $str;

}


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

Reply via email to