Sunday, November 8, 2009

Re: the white screen of death

Most of the time when I get this it is because of syntax errors.

As I mostly work on dedicated linux box, I just open a putty window
and do a tail -f of /var/logs/httpd/error_log and the cake error log
for all the $this->log(); in my code.

I have found that to be the best way to debug, as you will not always
be able 'see' something. I had this happen when I made 'site to site'
communication with xml where there was no interaction with a browser.
The trick is to add enough logging :)

On Nov 7, 6:45 pm, bradmaxs <b...@pezzano.com> wrote:
> So many times that I get the WSOD it is because I have forgotten to
> add a ) at the end of a line or there are too many.
>
> On Nov 7, 4:53 am, Bruno Bergher <bruno.berg...@gmail.com> wrote:
>
> > From previous experience the main cause for this is when
> > debug_backtrace() is called, in the global debug() declaration
> > (basics.php:114).
> > It chokes with undefined variables (in some installations, such MAMP,
> > this is a pain) and sometimes with very deep associative arrays.
>
> > This message is not too helpful since I have no idea how to solve
> > this, other than using var_dump() or print_r() in WSOD situations.
>
> > On Nov 6, 8:28 pm, Pedro Nascimento <pnascime...@gmail.com> wrote:
>
> > > I got one after copying some config options on files as database.php,
> > > core.php and app_controller.php using wrong symbols such as ` instead of '.
> > > It's a stupid mistake, but I have done it once or twice already. :>
>
> > > On Fri, Nov 6, 2009 at 20:08, Tonu Tusk <lvot...@googlemail.com> wrote:
>
> > > > OK, I doubt this will be of too much help, but the main causes of WSOD
> > > > I have encountered have been models not being declared in a
> > > > controllers $uses var
> > > > (where a controller is using other than its standard related model)
>
> > > > OR some bad relationships declared in model classes
>
> > > > (I am still a bit unsure of it all, but if i had model A hasOne modelB
> > > > and modelB belongs to modelA, that really seems to bomb things out for
> > > > me even though it seems quite intuitive to do so)
>
> > > > Oh yeah, and on one of my other recent posts I was getting random WSOD
> > > > which turned out to be mod_security installed on my shared host which
> > > > did not seem to like the combination of either large or a large number
> > > > of input in post data in combination with being routed through
> > > > mod_rewrite.
>
> > > > Go figure.
>
> > > > Has anyone else got any "d'oh" obvious and common errors which have
> > > > led to WSOD to share?
>
> > > > On Nov 6, 9:04 pm, "gimperdan...@gmail.com" <gimperdan...@gmail.com>
> > > > wrote:
> > > > > Yep,
>
> > > > > I already do debug($variable), but when code gets long, it can get
> > > > > pretty frustrating to test everything. Not to mention that if I get
> > > > > the white screen than I can't see anything including debug(var).
>
> > > > > My debug option is set to 3. Which is the max, but it doesn't change
> > > > > anything.
>
> > > > > On Nov 6, 3:14 pm, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
>
> > > > > > In addition, if the debug level is 2 you can add debug($variable)
> > > > > > (Either in controller or view) to your code to check that var... So
> > > > > > you can see if it's an improperly set variable that causes you to
> > > > > > white-out...
>
> > > > > > On 6 nov, 21:00, jacmoe <jac...@mail.dk> wrote:
>
> > > > > > > Open app/config/core.php and set the debug level to 1 or 2. :)
>
> > > > > > > On Nov 6, 4:16 pm, "gimperdan...@gmail.com" <gimperdan...@gmail.com>
> > > > > > > wrote:
>
> > > > > > > > More often that I would like to I get the "white screen of death",
> > > > > > > > which tells me something is wrong with my cold. Is there a way to
> > > > get
> > > > > > > > printed errors? instead of the white screen?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate