#43227 [Com]: eregi() mbregex compile err: premature end of regular expression in
ID: 43227
Comment by: lip at lip dot net dot ua
Reported By: baco at infomaniak dot ch
Status: Open
Bug Type: mbstring related
Operating System: Linux Debian
PHP Version: 4.4.7
New Comment:
I think these bugs are similar.
http://bugs.php.net/bug.php?id=44237
Previous Comments:
------------------------------------------------------------------------
[2007-11-09 16:03:14] baco at infomaniak dot ch
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 this bug report at http://bugs.php.net/?id=43227&edit=1
Thread (8 messages)