tags:

views:

117

answers:

2

hey folks, this is a really simple question. I'd like symfony to dump everything on its mind to the browser. I deployed to production, and nothing's working. not the logs, not the views, nothing. I just get a blank page.

is it possible to just see all of the [php/symfony] errors, somehow?

+1  A: 

Its generally not advisable to do this in production. Instead make sure you have logging_enabled: true in your settings.yml and then just look at the log file. If youre not getting anything inn your symfony logs, then take a look at the httpd error_log. If you really want to display errors take a look at the settings for the dev environment and copy the necessary settings to display errors.

However, you may still get the white screen of death if memory is being exhausted or the server is segfaulting.

prodigitalson
thanks. that got me rolling, indirectly. it wasnt logging on my dev machine to the httpd logs, but here it was trying to.
Oren Mazor
`it wasnt logging on my dev machine to the httpd logs` - well that would be an apache config issue not so much Symfony.
prodigitalson
+1  A: 

Such a problem could have multiple source : apache (or any webserver), php, symfony, etc.

I would first try to use the "application_name_dev.php" front controller on production server to see what's going on.

Then enabling log in production is a good idea, on both apache and symfony levels.

for the symfony part in factories.yml (in SF 1.4, don't know about other versions)

prod:   
  logger:
    class: sfAggregateLogger
    param:
      level: err
      loggers:
        sf_file_debug:
          class: sfFileLogger
          param:
            level: err
            file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log

We also use a hook that catch any uncaught exception and send us detail via email, but that's once the website is up

Benoit