Running CGI in Browser

MasterMindz

Junior Member
Nov 3, 2002
14
0
0
Ok, I'm using Linux Mandrake 8.0 and I want to know how to execute a simple Hello World CGI/Perl script in my browser (I'm a newbie to Linux). I was able to execute the script successfully from the terminal, but it just shows the actual code (print functions and all) in my browser. What must I do to execute this in a browser?

Thanks!
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
what server? apache?

you need to do a "chmod +x foo.pl" or something so apache knows it's supposed to actually run the script, and not just serve up the source.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: BingBongWongFooey
Why does everyone think chmod 777 is the answer to every permissions problem? DON'T CHMOD 777!

Because they don't understand permissions.
 

MonkeyK

Golden Member
May 27, 2001
1,396
8
81
CGI is just an executable that returns an HTTP webpage. It does not execute in a browser, the browser only interprets what it is given by the CGI (a string of HTML).