Menu

#1 Invalid range end errors...

open
nobody
None
5
2001-10-11
2001-10-11
No

I discovered a problem with several of the 'ereg' calls
in the XPath.class.php file. If you have PHP set to
use the system regex library (--with-regex=system) this
class will fail when doing anything other than a simple
"//*" path. The errors will be something like this.

> Warning: Invalid range end in ../../XPath.class.php
on line 2309
> Warning: Invalid range end in ../../XPath.class.php
on line 3080

I was able to fix the problem by recompiling PHP and
using the standard regex library. (This done by NOT
specifying the with-regex flag.)

Aparently the system regex library parses reg exps.
diferently than the built in library.

Moral of the story: If you are getting "Invalid range
end errors" when doing xpath queries, check your PHP
configuration (I used the php_info() function call.).

Later,

Dan

Discussion


Log in to post a comment.

MongoDB Logo MongoDB