PDA

View Full Version : preg_match fails on vb page


Exeter
01-10-2014, 10:49 PM
I calling a regex as part of some custom code. The expression fails when called on a vb page, and works just fine on a pure php page (with the same input string).

I am guessing there is something in the vb environment that affects how regex are called. Any idea what that might be?

Thanks for your help

kh99
01-10-2014, 10:59 PM
Hmm...is your php page running on the same web server as vbulletin? Can you post the code segment and the string?

Exeter
01-10-2014, 11:26 PM
Never mind, my fault all along.
I was dealing with HTML encoded strings on the vb side, and pure ascii on the test side.

I did find, however, that VB is disabling the regex mem/runtime limit in \includes\init.php. Be careful, if you run expensive regular expressions.


@ini_set('pcre.backtrack_limit', -1);