[wellylug] Perl scripts not executing in Firefox
John Durham
johndurh at spunge.org
Thu Jan 11 13:08:16 NZDT 2007
andrej at paradise.net.nz wrote:
> Quoting John Durham <johndurh at spunge.org>:
>
>
>> While testing server systems this morning, I found that a perl script
>> such as this:
>>
>> #!/usr/bin/perl
>>
>> print "Content-type: text/html\n\n";
>> print "Hello, world!\n";
>>
>> exit;
>>
>> This will execute in at the root command prompt, but when invoked in
>> Firefox, it just lists as plain text. Other scripts respond the same
>> way. Some insight on this would help get the website functions
>> operational.
>>
> 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.
--
John Durham
Site http://modecideas.com
Good advice is like good paint. It only works when applied.
More information about the wellylug
mailing list