[wellylug] Perl scripts not executing in Firefox

Phillip Hutchings sitharus at sitharus.com
Thu Jan 11 13:56:39 NZDT 2007


On 1/11/07, John Durham <johndurh at spunge.org> wrote:
> Phillip Hutchings wrote:
> >> 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.
> >
> By the appropriate virtual host do you mean the web browser or page
> environment? Is that second option to be included in the configuration
> files of the website itself rather than the server?

I believe the settings for CGI execution have to be done in the apache
config files, normally vhost config files in apache2 are in
/etc/apache2/sites-available/.

-- 
Phillip Hutchings
http://www.sitharus.com/




More information about the wellylug mailing list