If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I've been making some changes to a project I'm developing and I have a model as follows:

PHP Code:

/**
* The projectlink model represents the link Project HABTM Project.
* Because of the complexity of this relationship there are two relationships: Project HABTM Parent(Project) and Project HABTM Child(Project).
*/

Is it possible you actually are instantiating objects spanning that many levels of relationship? In other words, has your nesting got so large over time that you are trying to load a model, which loads its child, which loads its child and so on? If this is the case you could look into lazy-loading your objects.

Another thought - have you recently upgraded to PHP5.3? If so does setting debug: 0 get rid of the issue?

@NogDog:
There is actually almost no data in the database (maybe three records in total) because I had to clear it out to restructure it. Since I'm still building the data never get terribly numerous.

@Mindzai:
I am on PHP5.3, yes, but this was working on that platform. Also, setting debug to zero gives me a white screen for anything involving the project_links controller. No error messages at all. Debug at 1 or 2 give me the error message again.
It's strange that it should be doing this. The relationship of this ProjectLink model to the Project model has not changed at all.
Additionally, I gather that Cake only loads references to a model, each model is effectively singular and so MyModel1->MyModel2 === MyModel3->MyModel2 or am I mistaken. Were this the case then there would be lots of references but they would eventually peter out because even for a complex web of relationships, the references would mean that there would be no extra objects (or even references for that matter) loaded into the memory.
If anything I have actually reduced the number of models in the programme so I don't see why I am getting this problem. Alas! MacGDBp has not been of much use either.

Have you recently installed xdebug? It is this which is setting the 100 limit on recursion. I'm wondering if this error was always there due to the extra E_STRICT errors cake causes with 5.3, but that xdebug's 100 limit is not enough to allow debugger.php to finish up handling the errors (which is why I suggested turning debugging off, but of course that also hides PHP's errors so is entirely unhelpful).

Have you recently installed xdebug? It is this which is setting the 100 limit on recursion.

I've had xdebug going on this project for at least the last two/two and a half months so it's not a recent thing. This model was working with xdebug installed before. It is xdebug which is probably setting (or at least detecting) this limit.

Cake shouldn't be recursing this deeply anyway, should it?
It is fairly strange that the debug cycle is happening around the 99th function in the spiral. This suggests that Cake was breaking out of this cycle before the 100th function limit which means it wasn't an infinite loop. C'est un peu bizarre.

I think that there must be a problem anyway because if I turn debugging off, I just get a white screen and no errors (because I assume it sets display_errors to 0). Grr.