Knowledgebase: Perl/CGI


What is Perl?
Perl stands for Practical Extraction and Report Language. It is the most widely used language for CGI.

[ Back to Top ]


What is CGl?
CGI stands for Common Gateway Interface. Essentially it is a place where the Web server knows executable content lives.

[ Back to Top ]


How do I program in Perl?
Unfortunatley Burningbulb does notprovide PERL programming support. Please contact an experienced PERL programmer to assist you.

[ Back to Top ]


What version of Perl is installed on the Burningbulb.net servers?
Note that the number after the dash is the installed version:

CGI.pm - 2.42
DB I -0.93
GD - 1.18
HTML - Parser - 2.18
MD5 - 1.7
MIME - Base64-2.05
Msql - Mysql - modules - 1.1831 [this is the module that allows perl to communicate with msql]
ParallelUserAgent - 2.31
libwww-perl - 5.33

[ Back to Top ]


Where can I get a Perl tutorial?
We recommend: www.whizkidtech.com or www.lies.com

[ Back to Top ]


I need an example of a working CGI script. Could you provide one as an example?
Here is a basic cgi script written in PERL. If placed into your cgi-bin, named test.cgi, and if proper permissions are set (chmod 755) (rwx rx rx), it will run. It also must be uploaded in ascii.

#!/usr/local/bin/perl
print "Content-Type: text/html\n\n";
print "Hello world!\n";

[ Back to Top ]


What permissions are my Perl scripts suppost to be set at?
They should always be chmod 755. Also, always remember to UPLOAD IN ASCII

[ Back to Top ]


What do I have to name my Perl scripts?
INSIDE your cgi-bin, you can name your perl scripts anything BUT OUTSIDE your cgi-bin, you MUST name them: .cgi

Like p1.cgi index.cgi etc. You may not name them .pl outside of the cgi-bin, as they will never work like that :) Also, dont forget to UPLOAD IN ASCII and CHMOD 755

[ Back to Top ]


If I have a CGI script do I need extra SSH and do I have to configure it using SSH?
No, 99% of scripts do not need any type of TELNET/SSH access.

[ Back to Top ]


I placed a couple of CGI scripts on the server but they aren't working. Whats wrong?
Unfortunately Burningbulb does not offer support for scripts outside of what has already been installed on the server. Please contact a CGI programmer for assistance.

[ Back to Top ]


When I run my script I get an error that says "internal server error." Can you fix that?
This error message means there is a problem with your script not with the actual server. Please contact a CGI programmer for assistance.

[ Back to Top ]


Do the servers allow me to run CGI scripts outside of my cgi-bin directory?
Yes. Iin order to have your CGI script run automatically outside of the cgi-bin directory, it must have been named and saved with a ".cgi" extension.

[ Back to Top ]


Can I use CGI and Perl to read and write files?
Yes. You can use Perl and CGI to read and write files.

[ Back to Top ]


Can I use any CGI script?
We allow users to write and run their own cgi-scripts, but we reserve the right to disallow scripts that have harmful server side effects (ie. a persistant script).

[ Back to Top ]


Can I use Perl scripts in conjunction with your services?
Yes. Each account is setup with a cgi-bin directory from which perl programs can be run.

[ Back to Top ]


Can I run CGI scripts in my home directory?
Yes, but you MUST call them .cgi
You cannot name them .pl or any other extension.

[ Back to Top ]


Can I use index.cgi as a default index like index.html?
Yes. However, if you also have an index.html file the .html will over ride the index.cgi. You will need to delete the .html.

[ Back to Top ]


What extension do I add to perl cgi scripts?
Inside your cgi-bin, you can pretty much name them anything (.pl or .cgi).
Outside the cgi-bin, you need to name them .cgi

[ Back to Top ]


Can I install my own Perl modules?
No. We currently do not allow you to install Perl modules.

[ Back to Top ]


© 2003 Burningbulb.net