[rt-users] Communicate a message to web UI from inside Scrip?

Jeff Blaine jblaine at kickflop.net
Mon Jan 10 16:58:53 EST 2011


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:

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



More information about the rt-users mailing list