#23794 [Opn->Bgs]: Recurrance of bug #3269
| From: | moriyoshi@php.net | Date: | Sun, 25 May 2003 00:27:30 +0000 |
| Subject: | #23794 [Opn->Bgs]: Recurrance of bug #3269 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40361@lists.php.net to get a copy of this message | ||
ID: 23794
Updated by: moriyoshi@php.net
Reported By: kelly dot mctiernan at verizon dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Solaris 8
PHP Version: 4.3.1
New Comment:
The regex line is simply wrong and it shouldn't work in any situation.
[^a-zA-Z\200-\220\301-\236$numbers ]/
^^^^^^^^^
A character class should be represented by a sequence of any character,
a hyphen and a character with character code greater than the first.
(\236 is not greater than \301)
I guess \236 is a typo of \336.
Previous Comments:
------------------------------------------------------------------------
[2003-05-24 19:06:48] kelly dot mctiernan at verizon dot net
I'm sorry, it appears to be behavig correctly. This test was copied
directly from bug report #3269, which was the only problem I found
regarding Solaris/preg_replace. I should have investigated more
closely. Anyway, my problem is I'm getting the following error:
Warning: Compilation failed: range out of order in character class at
offset 13 in /usr/local/apache/htdocs/kbstudio/admin/map_site.php on
line 168
line 168 is
$html_text = preg_replace("/[^a-zA-Z\200-\220\301-\236$numbers ]/","
",$html_text);
This exact script behaves beautifully on Linux with the exact same
configuration. Also my phpshop is giving strange warnings. I'm using
gcc 2.95 on Solaris to complile and gcc 3.0 on Linux. Perhaps that's
the issue?
------------------------------------------------------------------------
[2003-05-24 18:19:44] moriyoshi@php.net
The output you pasted here doesn't seem to indicate any problem and is
obviously different to the one described in bug #3269.. So what's your
problem?
------------------------------------------------------------------------
[2003-05-24 18:06:32] kelly dot mctiernan at verizon dot net
This is my configuration:
./configure --with-mysql=/usr/local/mysql/
--with-apxs=/usr/local/apache/bin/apxs --with-curl=/usr/local/
------------------------------------------------------------------------
[2003-05-24 17:51:32] kelly dot mctiernan at verizon dot net
I am experincing the exact same behavior as described in bug report
#3269 on Solaris 8/PHP 4.3.1/Apache 1.3.27.
i.e:
<?
$regexes = array("/(bold)/i", "/(something)/");
$text = "This is really something to see! A bold new
achievement in the world of bugs. Not to mention something that I
probably misspeled there. Woo hoo!";
$new = preg_replace($regexes, "<B>\\1</B>", $text);
print $new;
?>
Result:
This is really <B>something</B> to see! A <B>bold</B> new achievement
in the world of bugs. Not to mention <B>something</B> that I probably
misspeled there. Woo hoo!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23794&edit=1