Page 1 of 1
[PHP] Problem with stack overflow
Posted: Thu Feb 19, 2004 10:33 am
by fedrok
Hi!
I've got a stack overflow problem using "preg_match_callback()".
Is there a way to increase PHP stack size?
I looked for it in PHP.INI but I'haven't found a parameter for stack size.
Any help?
Thanks.

Posted: Thu Feb 19, 2004 10:38 am
by markl999
It's a known/common problem. Before getting into though, what are you running on? Windows, Linux, Apache, IIS etc..etc..?
WOW!
Posted: Thu Feb 19, 2004 10:40 am
by fedrok
Yes!
I've installed PHP 4.3.3 under Windows 2000.
Can you suggest me anything to solve my problem?
THX!

Posted: Thu Feb 19, 2004 10:45 am
by markl999
Well, you need to either rewrite you preg or increase the stack size.
If you goto
http://bugs.php.net/search.php?cmd=disp ... k+overflow you'll see a few people have had the same problem. Not sure how you increase the stack size on windows though, i know there is a way, just not sure what it is
You could try increasing memory_limit in your php.ini
I have to increase the stack size!
Posted: Thu Feb 19, 2004 10:50 am
by fedrok
Yes!
Can you suggest me how can I increase the stack size?
Posted: Thu Feb 19, 2004 10:51 am
by markl999
Well, i'd fist try increasing the memory_limit in php.ini
SOB!! SIGH!!
Posted: Thu Feb 19, 2004 10:57 am
by fedrok
markl999 wrote:Well, i'd fist try increasing the memory_limit in php.ini
It doesn't work!!!
The problem persists!!!
Any other suggestion?
Please...
Posted: Thu Feb 19, 2004 11:00 am
by markl999
Post a snippet of your code, it's possible it's just a pcre that can be rewritten to be less greedy and require less memory.