[wellylug] Perl scripts not executing in Firefox
Phillip Hutchings
sitharus at sitharus.com
Thu Jan 11 13:41:31 NZDT 2007
> It is in the cgi-bin of the web server, and the page was loaded into the
> browser by opening the page file directly from the server.
Then your server isn't executing cgi scripts
> If perl isn't
> a client side scripting language, then why did the script execute at the
> command prompt and not in the browser? Both were used in the same system.
I think there's confusion on client- vs server-side scripting.
JavaScript is (normally) a client-side scripting language, the server
sends the script unaltered to the browser, and the browser then
executes the script. JavaScript is the only client-side language worth
speaking of.
Perl, Python, Ruby and almost every other language has to be used for
server-side execution. Here the script is executed by the web server
and the output of the script is sent to the browser. The browser never
sees the code. It worked from the command line because that's how the
webserver executes it (to oversimplify somewhat), but not in the
webbrowser because the browser has no clue what perl is.
Things to check:
That Apache either has:
ScriptAlias /path/to/cgi-scripts /cgi-bin
OR
<Location /cgi-bin>
Options +ExecCGI
AddHandler cgi-script .cgi
</Location>
in the appropriate virtual host.
--
Phillip Hutchings
http://www.sitharus.com/
More information about the wellylug
mailing list