[Rt-devel] inaccurate error message when the core config file is missing

Jesse Vincent jesse at bestpractical.com
Fri May 18 12:43:58 EDT 2007


Nick,

Can you shoot this to rt-bugs at bestpractical.com so it gets logged?

Thanks
jesse
On May 18, 2007, at 9:27 AM, Nicholas Clark wrote:

> 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,
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070518/2dfb54de/PGP.pgp


More information about the Rt-devel mailing list