 |
What 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.
What file permissions should I set for my scripts and data files?
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 yourscripts) 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.
Does BigBiz support PHP scripting?
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.
- We are currently running PHP version 3.0.3.
- Logging is turned off by default, this is for performance reasons. To enable it you can use SetLogging(1) in your scripts, or use a phpLogging on in your .htaccess.
- ShowInfo is turned off by default, most users preferred not to have the stats on the bottom of their pages. You can enable the feature by using SetShowInfo(1) in your scripts, or use a phpShowInfo on in your .htaccess.
- GD support is enabled, max image size is 1024x1024.
- PHP scripts run AS YOU, not as the webserver userid. This is a very significant security enhancement. Your scripts can open your files with secure permissions, other users scripts cannot open your files.
- Postgres and MySQL support is enabled.
- InitLog(count [,start_time] ) function is added, used to initialize the Logging file (if Logging is enabled). count is an integer giving the initial hit count. If the optional integer arg start_time is given, then it sets the starting time of the Log (number of seconds since midnight Jan 1 1970).
- MAGIC_QUOTES is not on, this interferes with form processing. Database users will have to do their own quote escaping.
- Basic Authentication passwords are NOT passed to your scripts, this was a security hole which allowed cleverly written scripts to steal passwords.
- Users of older versions of PHP/FI may note that the default setting of XBitHack has changed, and is now OFF. If you desire this feature for your web site, add the line phpXBitHack on to your .htaccess file. Note: the older PHP/FI defaulting XBitHack on was a bug!
Can I use server-side includes with my site?
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.
Do you offer any free scripts like a hit counter?
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.
Where can I find public collections of CGI scripts?
Check out the extensive collection of Perl scripts available at Matt's Script Archive (they are all compatible with BigBiz's servers). Other collections are available at Yahoo! and Developer.com.
I'm trying to configure a third-party script. What are the paths to programs on your servers?
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
|
 |