From:             nightstorm at tlen dot pl
Operating system: Mandrake Linux 9
PHP version:      5CVS-2003-07-03 (dev)
PHP Bug Type:     PCRE related
Bug description:  Preg_match and '# ... #x' delimiters

Description:
------------
I've changed my PHP 5 alpha into PHP 5 beta 1 from cvs. And i've noticed
that my template parser, which was written on PHP 5 alpha, didn't work. I
analyzed the script and i've noticed that problem's with preg_match and
preg_match_all instructions. They crashes, when the regular expression
contains '#' and '#s', '#is', or other combinations - the browser shows
the message that page cannot be found. When I remove or preg_match, or
these '#' from the expression, everything works good. Probably someone
changed some code in PCRE module, because the same code was working on PHP
5 ALPHA.

Reproduce code:
---------------
if(preg_match('#\{(.*?)\}#s', 'tralalalalala<html><hgkgkgk>compiled
{BLOCK} tralalalah', $found)){
  echo '<pre>'; print_r($found); echo '</pre>';
}



Expected result:
----------------
<pre> .... print_r result .... </pre>

Actual result:
--------------
The browser (Galeon) shows that message (in a message window):
"http://eniac.block22 couldn't be found. Please check the name and try
again".

-- 
Edit bug report at http://bugs.php.net/?id=24487&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24487&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24487&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24487&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24487&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24487&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24487&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24487&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24487&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24487&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24487&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24487&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24487&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24487&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24487&r=gnused

Reply via email to