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

Jeff Blaine jblaine at kickflop.net
Tue Jan 11 11:02:43 EST 2011


On 1/11/2011 10:49 AM, Kevin Falcone wrote:
> 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.

WINNER!  Thank you very much (and everyone else who threw out
ideas).

Phew.

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