[rt-users] How change favicon.png
Alexander Reintzsch
alexander.reintzsch at netsystem.de
Tue Jun 26 04:05:37 EDT 2012
Am Dienstag, den 26.06.2012, 01:02 +0400 schrieb Ruslan Zakirov:
> On Thu, Jun 21, 2012 at 2:27 PM, Jonathan Khattir
> <jonathan.khattir at mobiquithings.net> wrote:
> > Hi, I try to change the favicon.png but it's don't work. In apache log i
> > have this message :'<&' without matching '&>' at
> > /opt/rt4/local/html/NoAuth/images/favicon.png line 38
> > (/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:208)
> >
The problem is the Mason handler. You have got two options.
First one is, that you place the icon-file somewhere else (not in
RT-folders) where Mason will not try to interpret the file as some part
of source code.
Second one is a bit more complicated. You need to create a subdirectory
where you store the image of the favicon.
mkdir -p /opt/rt4/local/html/NoAuth/images/hiddensource
Then move the favicon into this folder.
mv /opt/rt4/local/html/NoAuth/images/favicon.png /opt/rt4/local/html/NoAuth/images/hiddensource/
Then you create a dhandler-file, which Mason will use when there is no
file with that name in the folder.
cat <<EOT>/opt/rt4/local/html/NoAuth/images/dhandler
<%INIT>
use File::Basename;
my \$arg = \$m->dhandler_arg;
my \$file = dirname(\$m->current_comp->source_file) . '/hiddensource/' .
\$arg;
RT::Interface::Web->SendStaticFile( File => \$file );
\$m->abort;
</%INIT>
EOT
Because the /opt/rt4/shared/html/NoAuth/images/autohandler exists you
need to locally overwrite it. Use the dhandler for this.
cp /opt/rt4/local/html/NoAuth/images/dhandler /opt/rt4/local/html/NoAuth/images/autohandler
This will make Mason send the static file and will not make it interpret
the favicon as some kind of source code.
Well and you might need to delete the favicon in
/opt/rt4/shared/html/NoAuth/images
Because else this one will be used.
mv /opt/rt4/shared/html/NoAuth/images/favicon.png /opt/rt4/shared/html/NoAuth/images/favicon.org.png
I hope that helps.
Greetings,
Alex
More information about the rt-users
mailing list