I recently noticed the stylesheet link in an html page had the href set
to a PHP script, as in:
<LINK REL="stylesheet" href="some_css.php" type="text/css">
Presumably the file being referenced was actually an executable PHP
script and not a css file that happened to have a .php extension.
Based on that assumption, I tried the same thing with a Perl script
(the webserver being tested happens to have mod_perl installed but not
mod_php), as in:
<LINK REL="stylesheet" href="dyn_css.pl" type="text/css">
The result was a server error with the error_log entry:
Bareword found where operator expected at
/srv/www/plwa/test/dyn_css.html line 4, near ""dyn_css.pl" type"
(Missing operator before type?)
The Perl script returns a simple stylesheet object...
body {
background-color: #000000;
font-family: Verdana;
font-size: 10px;
color: #FFFFFF;
border: 5px solid #AAAAAA;
}
.... which is exactly what the aforementioned PHP script returned when
retrieved by wget.
So, the question is: can an executable script be referenced in a
stylesheet link? If so, can anyome comment on why I might be getting
the above error from the server?
O/S: SuSE Linux 8.x
Server: Apache 2.x with mod_perl (.pl files associated with the
perl-script handler using an AddHandler statement).
Thanks!
--
Dave H.