Trying out SSI for the first time on my Apache 1.3.0 server, I decided
to write a small Perl script to output the current time on the server.
No problem - the SSI:
<!--exec cmd="clock.pl" -->
inserted the correct time into my page.
Then I added the ability to take an 'adjustment' argument, a figure in
hours to adjust the clock by, e.g.
The script runs fine when I telnet to the server and execute that line,Quote:> clock.pl +2
but when I include the SSI:
<!--exec cmd="clock.pl +2" -->
into my web page I get no output, as if the SSI were simply replaced
with
nothing. Similarly,
<!--exec cmd="/bin/ls" -->
works, but
<!--exec cmd="/bin/ls -la" -->
does not.
The Apache documentation says:
What am I missing ?Quote:> ...
> exec
> The exec command executes a given shell command or CGI script.
> The valid attributes are:
> cmd
> The server will execute the given string using /bin/sh.
> The standard include variables are available to the command.
> cgi
> ...
Thank you,
Isaac Wilcox
:)