[wellylug] Perl scripts not executing in Firefox

John Durham johndurh at spunge.org
Thu Jan 11 13:48:55 NZDT 2007


andrej at paradise.net.nz wrote:
> 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.
>   
On the command line the following was used to run the script:
perl Hello.cgi
> If you openend word.exe in word, what would you expect to happen?  
> See gibberish or run a second instance of word?
Point taken.
-- 
John Durham
Site http://modecideas.com
Good advice is like good paint. It only works when applied.




More information about the wellylug mailing list