tags:

views:

38

answers:

1

I have CakePHP (1.3.2) running on UniformServer (basically a WAMPP server), and for some odd reason CakePHP makes the entire server crash when certain errors occur, forcing me to restart it. This is very annoying because not rarely a small typo results in a full minute of wasted time.

I haven't pinpointed the reasons yet, but it appears that whenever a page is partially rendered and there's an error, it crashes the server. Scripts outside of Cake handle errors just fine; so do Cake scripts that crash before the page is rendered.

Anyone ran into that?

A: 

I have encountered that issue before, it happens to me often when I try to access a variable in my view file when that variable is not set from controller.

What you need to take note is always to $this->set(compact('variable')) from your controller before you try to access it.

Another solution might be to a "isset()" check whenever you access a variable in your view.

The-Di-Lab