[wellylug] Perl scripts not executing in Firefox
andrej at paradise.net.nz
andrej at paradise.net.nz
Thu Jan 11 13:37:56 NZDT 2007
Quoting John Durham <johndurh at spunge.org>:
> > Well ... if you didn't put the file in the CGI directory of your
> > web-server, and pointed firefox at that this is working as designed.
> >
> > perl isn't a client-side scripting language like JavaScript.
> 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. 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.
The question, I suppose, is how you tried to access is
http://localhost/cgi-bin/your_file.pl
or
file://vaw/www/cgi-bin/your_file.pl
In the first case (if perms are OK and apache is set-up correctly) it
will execute.
In the second case it will always open as a text-file because (as I
said) it's a server-side scripting language. And you can't really compare
invoking a script on the commandline to opening it in a browser.
If you openend word.exe in word, what would you expect to happen?
See gibberish or run a second instance of word?
More information about the wellylug
mailing list