|BigBiz FAQ Home | General Info | Domain Registration | Email | FTP | Scripting | Site Design | MS FrontPage||Contact Us|
kind of CGI scripts can I run on my web site?
You can write CGI scripts using a variety of scripting languages. BigBiz provides Perl, Tcl, and Python, as well as standard Unix scripting languages such as sh, csh, awk, etc. You can even run binary programs, like compiled C programs.
BigBiz does not require you to place your CGI scripts into special restricted directories, nor do we make you submit your scripts for inspection like other web hosting services. We have taken special measures with our software and operating system to protect against the kinds of problems that plague other providers which force them to take restrictive actions. For example, to reference a script in the same directory as your HTML form, simply use a line like this:<FORM METHOD="POST" ACTION="myscript.cgi">
Many users prefer to gather all their scripts under one directory. You may do this too, by creating a directory under your HTML directory called cgi-bin or another name of your choosing. You can then reference the script with a line similar to:<FORM METHOD="POST" ACTION="/cgi-bin/myscript.cgi">
The web server will invoke the CGI script if the extension on the script file is .cgi, .pl, or .tcl and the script file has execute permission (see What file permissions should I set for my scripts and data files? for more information).the Unix chmod command on how to assign permissions to files).
There are also public collections of CGI scripts that you can run on the BigBiz servers. See Design FAQ - What other resources are available to help me design my site? - CGI Scripts for more information.
Your scripts should be set to file permission 750 as this will provide the best security. Any data files that are accessed by your own scripts should have their permissions set to 600 so that only you (and your scripts) can read and write the file. Nobody else on the system (and their scripts) will be able to access your file. This is very important if your files contain sensitive information, like credit card numbers.
BigBiz offers PHP scripting as an alternative to CGI scripting. PHP is built directly into the webserver and so will run much faster than a normal CGI script. It has many features which make it the language of choice for webmasters, including native support for accessing database systems. This is definitely worth your effort to learn.
A PHP script can be simply a HTML file. Scripting commands are embedded within your HTML. The BigBiz webserver will automatically interpret the file as a PHP script if the extension is .phtml or .php.
BigBiz has made some enhancements to the language we feel would benefit our users.
Yes, server-side includes (SSI) is available. Simply name the include file with the .shtml extension (do not use .sht or .shtm). This is provided mainly to support existing scripts. You may want to investigate PHP scripting as an alternative. You can learn about SSI here.
We have a hit counter you can use, at http://www.bigbiz.com/cgi-bin/Count.cgi. Documentation for this script is available here. You may access this counter with a line in your web page similar to:
<IMG SRC=http://www.bigbiz.com/cgi-bin/Count.cgi?df=yourdomain_counter.dat> (the name of the .dat file should be unique)
There is also a form handling script available for your use (more information) and several other public scripts. Look in the directory /usr/local/apache/cgi-bin for examples.
Often, when you are configuring a third-party CGI script, it will ask you a series of questions or require that you edit a configuration file and tell the script where certain programs and directories are located on the server. Here is a list of the most commonly requested items:
- perl: /usr/bin/perl
- sendmail: /usr/sbin/sendmail
- date: /bin/date
- your home directory: /home/your_domain_name/html
- your CGI directory: /home/your_domain_name/html/cgi-bin