[Rt-devel] inaccurate error message when the core config file is
missing
Nicholas Clark
nick at ccl4.org
Fri May 18 09:27:20 EDT 2007
On Mon, May 14, 2007 at 01:03:17PM -0400, Jesse Vincent wrote:
>
> On May 14, 2007, at 10:14 AM, Nicholas Clark wrote:
> >I'm not sure of the best way to implement the message to also cope
> >with
> >"file is missing". Suggestions?
>
> It might make sense just to have a separate check.
Something like this?
[Sorry, looks like my use of tabs is inconsistent with RT's code policy]
Nicholas Clark
--- lib/RT.pm~ Fri May 18 10:50:48 2007
+++ lib/RT.pm Fri May 18 13:23:29 2007
@@ -162,6 +162,12 @@
eval { require $CORE_CONFIG_FILE };
if ($@) {
my ($fileuid,$filegid) = (stat($SITE_CONFIG_FILE))[4,5];
+ if (!defined $fileuid) {
+ die <<"EOF";
+RT core config file $CORE_CONFIG_FILE not found.
+RT can't run without this. Have you installed RT correctly?
+EOF
+ }
my $fileusername = getpwuid($fileuid);
my $filegroup = getgrgid($filegid);
my $errormessage = sprintf($message, $SITE_CONFIG_FILE,
More information about the Rt-devel
mailing list