[rt-users] Communicate a message to web UI from inside Scrip?
Kevin Falcone
falcone at bestpractical.com
Tue Jan 11 10:49:01 EST 2011
On Mon, Jan 10, 2011 at 04:58:53PM -0500, Jeff Blaine wrote:
> Still no luck. Can anyone suggest how I might debug why
> this isn't working? I'm begging at this point :) Here's
> the most complete picture I can paint for you right now:
You can instrument the callback method that looks for these, but it is
also worth checking in Configuration -> Tools -> System Configuration
that you're using the correct Mason roots.
I've also seen selinux prevent access to files that should otherwise
be readable.
-kevin
> The following entire directory structure is set "drwxr-xr-x"
>
> /rt/local/
> |-- html/
> |---- Callbacks/
> |---- MyCallbacks/
> |----- Ticket/
> |-- Display.html/
>
> # pwd
> /rt/local/html/Callbacks/MyCallbacks/Ticket/Display.html
> # ls -l BeforeDisplay
> -rw-r--r-- 1 rt root 668 Jan 6 22:19 BeforeDisplay
> #
> # cat BeforeDisplay
> <%INIT>
> $RT::Logger->crit("In Display.html/BeforeDisplay\n");
> return 1;
> </%INIT>
> <%ARGS>
> $Actions => []
> </%ARGS>
> #
>
> # /etc/init.d/rtsrv1dev-httpd restart
> Stopping httpd: httpd
> Starting httpd: httpd
> #
>
> Login to site. Here you can see that various calls to RT::Logger
> *do* log to /var/log/messages
>
> Jan 10 16:26:25 rtdev1 RT: Successful login for jblaine from
> xx.xx.5.133 (/rt/bin/../lib/RT/Interface/Web.pm:430)
>
> View ticket, resolve ticket, again proof that logging can happen:
>
> Jan 10 16:27:11 rtdev1 RT: Apache2::RequestIO::rflush: (103)
> Software caused connection abort at /usr/lib/perl5/site_perl/5.8.8
> /HTML/Mason/ApacheHandler.pm line 1020 (/rt/bin/webmux.pl:168)
>
> Re-open ticket, resolve ticket, view ticket over and over...
>
> [ nothing ]
>
> If I then add the following to the callback code (inside
> the INIT block), nothing is ever written out to /tmp/jblaine.txt:
>
> open (GRRR, '>>/tmp/jblaine.txt');
> print GRRR "HELLO?\n";
> close (GRRR);
>
> So the code is never even getting executed.
>
> If I then 'cp BeforeDisplay BeforeActionList' and also
> 'cp BeforeDisplay BeforeShowSummary' to create two more
> callback tests, in order to prove that it's not just the
> callback for BeforeDisplay that is broken ... those do
> not work *either* (after a server restart of course).
>
> On 1/7/2011 10:03 AM, Jeff Blaine wrote:
> >On 1/7/2011 9:56 AM, Kevin Falcone wrote:
> >>On Thu, Jan 06, 2011 at 10:16:55PM -0500, Jeff Blaine wrote:
> >>># ls -l BeforeDisplay
> >>>-rw-r--r-- 1 rt root 689 Jan 6 22:06 BeforeDisplay
> >>
> >>Can your web user read this file?
> >
> >Every directory from (and including) /rt/local downward
> >is world readable and executable/traversable.
> >
> >The file, as above, is world readable.
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110111/6cde5f1f/attachment.sig>
More information about the rt-users
mailing list