A symlink to a centralized error500 page should also work.

On 8/30/07, David Brewer <[EMAIL PROTECTED]> wrote:
>
> This is a good question; I just ran into exactly the same issue.
>
> Here are the details of how this appears to work currently.  You can
> customize the error500.php page for your project by creating a file in
> your web folder like so:
> web/errors/error500.php
>
> However, let's say you have multiple applications configured.  In my
> case I have a website application called "site" (rooted at
> my.example.com/), and a web services application called "srv" (rooted
> at my.example.com/srv/).  Uncaught exceptions thrown by both "site"
> and "srv" send the user to web/errors/error500.php.  I'd prefer to
> have the option to either use a centralized file as it works now, or
> define a different file for each application.
>
> My workaround is to make a special web/errors/error500.php file that
> does its own routing for this situation.  If SF_APP is defined, it
> builds a hypothetical path to a custom error500.php file for the
> application.  In my case, I want them to live at
> web/APPNAME/errors/error500.php.  If that file exists, it includes
> that file and exists.  Otherwise it just displays the content of the
> error500.php file which follows.
>
> I hope that helps you!  The code which I stuck at the top of
> web/errors/error500.php is below:
>
> <?php
> if (defined('SF_APP')) {
>     $custom_500_file = sfConfig::get('sf_web_dir')
>         . DIRECTORY_SEPARATOR . SF_APP
>         . DIRECTORY_SEPARATOR . 'errors'
>         . DIRECTORY_SEPARATOR . 'error500.php';
>
>     if (file_exists($custom_500_file)) {
>         include($custom_500_file);
>         exit(1);
>     }
> }
> ?>
>
> David Brewer
>
> On 8/27/07, Olivier Revollat <[EMAIL PROTECTED]> wrote:
> > How can I customize error 500 page
> > (symfony_core/data/web/errors/error500.php) for different
> > applications in the same project ... ?
> >
> > Thanks ;)
> >
> >
> >
> >  >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to