From:             craig at unclecraig dot com
Operating system: Windows XP Pro
PHP version:      4.3.10
PHP Bug Type:     PCRE related
Bug description:  PCRE bugs under Windows XP

Description:
------------
I'm using the latest snap shot (php4-win32-STABLE-200502191330) on Win XP
with Apache 2.

I've experienced a number of problems with pgrep_replace/pgrep_match that
only occur under windows.  The same code works fine under linux.

The example below is easily reproduced.  The expression splits a file into
it's components - path, name, ext (where ext can be multi part)

When the name part exceeds 12 chars, the expression no longer matches. 
This is not the case using RegExp Coach on the same platform.

I also get a problem when using the following:
// Remove C comments
$content = preg_replace( "|\/\*((?!\*\/).)*\*\/|is", "", $content);

This used to work fine, then suddenly it stopped, no error is returned
execution just halts here and the document returns no data.  I made no
modification to the PHP base, just some of the files that were being
parsed got a bit bigger so this code be a memory issue??? Still no errors
are generated php just halts.  (This is one reason I increased the
memory_limit directive in the php.ini file)

Please help, as I can no longer debug under windows, and I face having to
rewrite large chunks of code to avoid using preg functionality!

-- PHP.INI --
max_execution_time = 150
memory_limit = 64M
extension=php_filepro.dll
extension=php_mcrypt.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_zip.dll
[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.JIT_enabled=on
debugger.JIT_host = clienthost
debugger.JIT_port = 7869
mime_magic.magicfile = "C:\Program Files\Apache Group\Apache2\conf\magic"

Reproduce code:
---------------
<?php
echo
"\n".preg_match('|^((?:(?:\/?[^\/]*)*)(?:\/))?([^\/\.]+)\.([^\/]+)$|i','012345678901.mod.inc',$parts);
echo
"\n".preg_match('|^((?:(?:\/?[^\/]*)*)(?:\/))?([^\/\.]+)\.([^\/]+)$|i','0123456789012.mod.inc',$parts);
?>


Expected result:
----------------
1
1

Actual result:
--------------
1
0

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

Reply via email to