views:

698

answers:

4

I am on a windows IIS server serving some php sites. We have moved a working PHP site on to our server, however submitting one of the forms returns:

PHP has encountered a Stack overflow

When commenting out the MYSQL INSERT and assigning SESSION variables the form processes, however these are vital segments of the submission form.

Any help would be greatly appreciated.

+6  A: 

Too much recursion?

Evan Fosmark
See http://stackoverflow.com/questions/466884/what-generally-causes-php-to-encounter-a-stack-overflow#466901
Greg Hewgill
Argh ... you've stack overflow'et stack overflow ... that's like a recursive recursion ...
troelskn
Haha, nice one Greg.
Evan Fosmark
I just accidentally this whole post.
tj111
@Greg: I wish we could upvote comments.
Crescent Fresh
+1  A: 

For me it's usually an infinite loop (including infinite recursion)

Dinah
+1  A: 

Which version of php are you using? In some older versions, an infinite (or very deep) recursion would cause a stack overflow, if I remember correctly. Today you would get a more specific error message ("Maximum function nesting level of '100' reached, aborting!").

You mention sessions as a possible cause; Are you storing complex data structures in session? Sessions are serialized and unserialized between requests, which probably could cause some problems if you put too much stuff in them (Not sure how much is too much though). Maybe you could reduce on that?

troelskn
A: 

[off-topic]

$stackoverflow = file_get_contents('http://stackoverflow.com/tags/php');
// voila, php encountered stackoverflow ^-^
SchizoDuckie