Edit report at https://bugs.php.net/bug.php?id=47689&edit=1

 ID:                 47689
 Comment by:         djokodonev at gmail dot com
 Reported by:        vr...@php.net
 Summary:            crash with certain regular expression
 Status:             Not a bug
 Type:               Bug
 Package:            PCRE related
 Operating System:   win32 only
 PHP Version:        5.*, 6CVS (2009-03-17)
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

This should be added to the PCRE(preg_match etc..) documentation. It had me 
clules for a long time as of what it going on.


Previous Comments:
------------------------------------------------------------------------
[2011-09-29 13:34:44] paj...@php.net

It would be nice to add that to both apache 2.2 configuration and pcre docs.

------------------------------------------------------------------------
[2011-09-29 12:35:55] ferenczy at volny dot cz

Better way to alter Apache stack size is using the ThreadStackSize directive in 
the Apache's configuration file (httpd.conf). There is a description of the 
ThreadStackSize directive in Apache's documentation: 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#ThreadStackSize

So increase of Apache stack size might looks like this (lines from httpd.conf):

<IfModule mpm_winnt_module>
   ThreadStackSize 8*1024*1024
</IfModule>

It sets Apache stack size to 8 MB, so it's the same as a default value on Linux.

------------------------------------------------------------------------
[2009-07-06 17:43:44] paj...@php.net

That's not something we can change for apache. You can fix the problem by 
increasing the stack size for apache using the following command:

editbin /STACK:8000000 c:\apache22\bin\httpd.exe

Sadly this tool is not available as a standalone app but VC Express should have 
it.

Close (bogus) this bug as it is not something we can change in PHP. We can 
increase the stack at wish but it is apache dependent. FastCGI does not seem to 
have this problem (was not able to crash it).

------------------------------------------------------------------------
[2009-06-18 13:27:10] peter dot swietoslawski at me dot com

I'm experiencing similar crash on PHP 5.2.9-2, Apache 2.2.11, Vista 
SP2 
if I run simple code like:

<?php

  $content = '
  <!-- Book Navigation Start -->
  <div>
  <ul class="menu"><li class="collapsed first">Web Services</li>
  <li class="collapsed">Integration Tools</li>
  <li class="leaf">Developer Group</li>
  <li class="leaf last">Developer Forum</li>
  </ul>
    <div class="page-links clear-block">
        <a href="test/wws" class="page-next" title="Go to next page"> 
Web Services </a>
    </div>
  </div>
  <!-- Book Navigation End -->
  ';

  $pattern = '/<!-- Book Navigation Start -->((.|\s)+)<!-- Book 
Navigation End -->/i';

  preg_match($pattern, $content, $book_nav);
?>

However this works fine in PHP 5.2.8 and in CLI for 5.2.9-2.

------------------------------------------------------------------------
[2009-05-21 20:25:47] paj...@php.net

Only wondering which impact has this change, have to test first before to 
increase the stack.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=47689


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=47689&edit=1

Reply via email to