PricesClassesSignupClients SitesDesignAbout UsFun Stuff
Help Me!

CGI on Bway
Although bway.net allows users to run cgi scripts, we will not support that function beyond what is included in this document. That said, this information summarizes what you need to know about how to set up your scripts on our system.

Settings for Personal and Small Business Accounts (ida.bway.net)

The path to perl: /usr/local/bin/perl

Version of perl: Perl 5.8.8

Path to sendmail: /usr/sbin/sendmail

The Webserver is Apache version 2.0.59.


Settings for Commercial and Domain Accounts (zara.bway.net)

The path to perl: /usr/local/bin/perl

Version of perl: Perl 5.8.8

Path to sendmail: /usr/lib/sendmail

The Webserver is Apache version 2.0.59.


Both Servers

You can run cgi programs on our server; the programs do not need to be any special directory or place. However, we recommend using a cgi-bin directory.

The requirements for cgi to run on our server are:
  • The file must be saved as 'ascii text'. That means just plain ol' text.
  • The program has to have the correct syntax and point to our server, i.e., most shareware programs need to be altered slightly so that the variables are defined correctly.
  • The program needs to be called "filename.cgi" where the ".cgi" part tells the server that it's a cgi program. Image maps, similarly, need to be named "filename.map".
  • The program needs to be set to be world executable. You need to open a telnet program, log into bway.net, get to the directory where the cgi programs resides, then type "chmod 755 filename.cgi" at the ida prompt. Here is a sample transcript of changing a test file's permissions:


  • 
    ida 1% pwd
    /home/d/damian/
    
    ida 2% cd html
    
    ida 3% ls -l test.cgi
    -rw-r--r--   1 damian   user           86 Oct  6 13:20 test.cgi
    
    ida 4% chmod 755 test.cgi
    
    ida 5% ls -l test.cgi
    -rwxr-xr-x   1 damian   user           86 Oct  6 13:20 test.cgi
     
     


    The command at the first ida 1% prompt is pwd (Print Working Directory). This tells me where I am in the server's file system. Since the file is in my public html directory (which is one level down from my home directory), I need to Change Directory, which is the command I type at the ida2% prompt. I then use the command ls or List, with the modifier -l, which gives me the long listing so I can see the permissions mode (the -rw-r--r-- at the beginning of the line) that the file is in. As it stands, no permissions are set for executable. The chmod 755 command at ida 4% means Change Mode, and 755 tells it to set the file to the following permissions (regardless of how it was set before): User can read, write and execute; Group (in this case, the user group) can read and execute; World can read and execute. The ls -l command at ida 5% confirms the change in permissions.

    When you test the file from a web browser, if it returns the error message: "Server Error - This server has encountered an internal error which prevents it from fulfilling your request. The most likely cause is a misconfiguration. Please ask the admi nistrator to look for messages in the server's error log," this message does not indicate a problem with the server - it means that there is a flaw or misconfiguration with the script. Go back to work. Have fun.



w w w . b w a y . n e t
568 Broadway, Suite 404 .. New York City, 10012 .. tel 212.982.9800 .. fax 646.290.8317
info@bway.net