From:             jimriver76 at yahoo dot co dot uk
Operating system: windows server 2003
PHP version:      5.2.9
PHP Bug Type:     PCRE related
Bug description:  periodically "Nesting level too deep - recursive depende"

Description:
------------
Since Feb 2009, all php scripts in my server suddently and selectively
produced an curious error message in php log as following:

[code]
[16-Apr-2009 22:03:00] PHP Fatal error:  Nesting level too deep -
recursive dependency? in D:\websites\nameclub\include\common.inc.php on
line 56
[/code]

This proplem continued even after I upgrade to the current 5.2.9 version.

After checking all those lines of code, I found some similarities of that
issue. They always caused by preg_replace or preg_match: 

[code]
$boardurl =
'http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api|archiver|wap)?\/*$/i",
'', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/';
[/code]

[code]
// $cip = 124.227.153.46 
preg_match("/[\d\.]{7,15}/", $cip, $cips);
[/code]

Another curious characteristic is that it dosen't happen always. Instead,
it ran into this problem only at a 1/3 chance. Normally, after I refleshed
the same page, it worked just fine. That is why I believe it should be
reported as a bug. 

Btw, I could provide some help if one of you ever have this kind of
problem. The way I 'fixed' it is uncomment the pcre.recursion_limit line

;pcre.recursion_limit=100000

I don't know why but it just fixed the issue perfectly for me.

Yes I search a lot by the 'Nesting level too deep' keywords, but found
none of them related to pcre extension, which I believe that mine has
connection with.


Reproduce code:
---------------
$boardurl =
'http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api|archiver|wap)?\/*$/i",
'', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/';


...
// $cip = 124.227.153.46 
preg_match("/[\d\.]{7,15}/", $cip, $cips);


Expected result:
----------------
null


-- 
Edit bug report at http://bugs.php.net/?id=47989&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47989&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47989&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47989&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47989&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47989&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47989&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47989&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47989&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47989&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47989&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47989&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47989&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47989&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47989&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47989&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47989&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47989&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47989&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47989&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47989&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47989&r=mysqlcfg

Reply via email to