PDA

View Full Version : CGI-Perl - How do you set it up?


minimrest
16-06-2008, 12:23
I have just setup an account with ntl:telewest business. The web space provided says that 'CGI settings are enabled'. This suggests to me that some kind of server side scripting is supported. But, ntl:telewest business don't provide any documentation on how to set up this, Ringing or emailing results in nothing. I am very new to server side scripting , but as far I understand the server runs a perl intepreter on the specified code when the following line, in the HTML, is parsed:-

<!--#exec cgi="/cgi-bin/test.pl"-->

As long as you place test.pl within the cgi-bin directory this should all work. My test.pl is very simple....

#!/usr/local/bin/perl
print "Test hello\n";

But nothing happens....

I am not sure if the location within the shebang line of test.pl is correct for the NTL server, or if perl scripts are actual supported? Is further setup required????

I have also read that if you are able to telnet into the server you willl be able to run the scripts at the command line, and also verify the location of the perl intepreter so that the correct shebang line can be specified.

NTL don't provide a telnet login!!!!

Has anybody successfully used server side scripting with a NTL telewest business account ??? (or any other)

Please help

Thank you

Rich

BenMcr
16-06-2008, 23:12
http://www.ntltelewestbusiness.co.uk/customer_area/broadband__internet_faqs.aspx

Choose Webhosting as a catagory and then there are two CGI subcatagories

Kymmy
17-06-2008, 14:26
Has anybody successfully used server side scripting with a NTL telewest business account ??? (or any other)

Yes but as I run my own server that's not suprising....

The business webhost is pathetic to say the least for a business broadband package...

Kymmy

NH-Darryl
17-06-2008, 15:01
Hi,

I'm not really familiar with the NTL setup, but I can offer you some advice.

For the HTML file that you are referencing the script from, ensure that the file extension on this is .shtml so that the web application knows this file needs to be parsed.

In the script you are running, you will need to check that the path to perl is correct, another typical path that is a possibility is #!/usr/bin/perl

You should also add the content type to this file, this is what a working test file from our servers would look like:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Test hello\n";

Hope that helps!

Regards,

Darryl