From:             baco at infomaniak dot ch
Operating system: Linux Debian
PHP version:      4.4.7
PHP Bug Type:     mbstring related
Bug description:  eregi() mbregex compile err: premature end of regular 
expression in

Description:
------------
eregi() produce random errors like "function.mb-eregi: mbregex compile
err: premature end of regular expression in" when used with special chars
like accents.

N.B. On the web you can found a lot of reports of this issue. Some post
suggests forcing mbstring.func_overload = 0 but it doesn't work for me.

If Apache1 is restarted the error doesn't come anymore before an amount of
time and request.

$ GET http://localhost/test.php
ok

$ GET http://localhost/test.php
ok

$ GET http://localhost/test.php
<br />
<b>Warning</b>:  mb_eregi() [<a
href='function.mb-eregi'>function.mb-eregi</a>]: mbregex compile err:
premature end of regular expression in
<b>/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php</b> on line
<b>2</b><br />

$ GET http://localhost/test.php
<br />
<b>Warning</b>:  mb_eregi() [<a
href='function.mb-eregi'>function.mb-eregi</a>]: mbregex compile err:
premature end of regular expression in
<b>/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php</b> on line
<b>2</b><br />

$ GET http://localhost/test.php
<br />
<b>Warning</b>:  mb_eregi() [<a
href='function.mb-eregi'>function.mb-eregi</a>]: mbregex compile err:
premature end of regular expression in
<b>/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php</b> on line
<b>2</b><br />

$ GET http://localhost/test.php
ok

$ GET http://localhost/test.php
ok

...


Reproduce code:
---------------
<?php
    if (eregi("cité", "electricité")) {
        echo "ok\n";
    }
?>

Expected result:
----------------
OK

Actual result:
--------------
<br />
<b>Warning</b>:  mb_eregi() [<a
href='function.mb-eregi'>function.mb-eregi</a>]: mbregex compile err:
premature end of regular expression in
<b>/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php</b> on line
<b>2</b><br />

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

Reply via email to