thanks!
No code and no error messages so here's my wild guess... Are you getting
the classical "Allowed memory size of XXXXXX bytes exhausted" error message?
I've done some simple testing with a 8 MB string and it can use huge
amounts of memory. You can raise the limit with ini_set() but it may not
be practical to allocate 1GB of RAM for each script instance.
Options I can think of:
1. Use a faster (compiled) language instead of PHP.
2. Preprocess the source string so you can split it safely into smaller
parts.
3. Think of an entirely different algorithm. A regexp that's fine for a
swear word filter may not be appropriate for a spell checker.
--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
thank for the answer Alvaro
I've already changed the ini_set() but still make error.
I try to explain.
I've to do a preg_match_all of a string from poin A to point B the
result should be a string of 290370 character ( number calculated from
strlen function )
If I made a smaller point A to B the preg_math_all works fine.
I hope I have explained correctly as possible
> I've already changed the ini_set() but still make error.
What error? What makes you think error messages are not relevant?
> I try to explain.
> I've to do a preg_match_all of a string from poin A to point B the
> result should be a string of 290370 character ( number calculated from
> strlen function )
> If I made a smaller point A to B the preg_math_all works fine.
> I hope I have explained correctly as possible
Alright, let's summarize what we have so far:
1. You have a long string
2. You apply a pattern
3. You get an error
With such information, the only possible advice is: fix your code ;-)
--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
becouse there is no message error from preg_match_all.
However I found the error was that I had not inserted / s at the end
of the regex pattern.
thanks