Before this page
See the advice for a novice first where you make compulsory changes on the first line (path) and the basic set up for password, url, etc. and, if necessary, "chdir" command to change the directory at the button of the basic set up. You may make any optional changes but please do so after you confirm that the default CGI works.

You may change other basic setting and HTML or a part of HTML (see the advice for a little learnt).

"sendmail"
You can change mail notices, too. Perl utilizing "sendmail" sends you a mail when a new message is posted.
######################
# new message to bbs #
######################
     :
     :
### mail notice start ###
     :
     :
To: $addrss
Subject: New Entry to your Message Board

$data{'title'}

To and Subject are standard mail headers. You can have Cc or Bcc or whatever you like here as far as they conform to the mail protocols. Please note, you must have one blank line between the mail head and body to separate them. In the above case, a blank line below Subject:. You can change the body any way you like. You may not have the body at all. Keep the blank line after the head and it can reach you. Do not delete print MAIL <<"MAIL_NOTICE"; and MAIL_NOTICE, between which the mail is inserted.


If you are testing your CGI before uploading it to the server, you need "Web-Server Program", "Perl" and "Browser." I think you already have a browser, IE or NetscapeNavigator or something. A CGI does not work without properly placed at a server. (Though you can check its syntax by Perl alone without setting up server. A script could malfunction even if syntax is ok.)

I assume you are not really starting server business. You are just testing CGI and never make outside connection while server program is running. Then you are the only user and you can set everything open and accessible (permission 777, an easy choice). If in doubt, disconnect the telephone line. If your computer is connected to a local-network, or intra-net and can not be, or should not be disconnected, ask your network administrator first. There may be something you can do technically but prohibited by regulations. Depend on how you ask, the system administrator can be your asset or liability.

Latest Mac and Windows come with a web-server program. Consult with the manual. Find Personal WebSharing (for Mac) or Microsoft Personal Web Server (for Windows). You may download much fancier program from internet. A lot of free-(or share-)wares are availably there.

I myself used Mac with Personal WebSharing. TCP/IP (you find it in AppleMenu if you never modified the system) setting is: select LocalTalk (or AppleTalk or MacIP); IP address is manually sat 192.168.1.1; Subnet Mask (or router) is 255.255.255.0; Gateway is 0.0.0.0. Using AppleTalk means AppleTalk must be on. At least it works for me.

(Lately I have added Linux. With a right distribution, my Linux + Apache + Perl work upon the installation. The only trouble is - a lot of folks cannot install Linux.)

Next, you run a server program. Select a folder (or directory) to be shared via WebSharing. It can be advised that the folder is placed directly under a hard-disk. (Apple says after 5th subdirectory it may malfunction.) You may select your homepage, too. I hope all this wouldn't confuse you. I needed one week till the server up and running. Check internet, there are many web-sites advising this or that.

(As I already stated Perl worked upon Linux installation. I started a browser, typed http://localhost/ and I found that the local server was working. I dropped a CGI script into the directory cgi-bin, set the permission 755 and it worked. The only truoble was - I spent three days to install Linux.)

Run a browser and type "http://192.168.1.1/" (or your IP address) in the location window. If everything is ok, you see the listing of the folders and files in the folder you've selected for WebSharing or if you have a homepage there, the homepage. Depend on setting, and if you do not have the homepage, you may be warned "file not found" etc. It's ok. You add a name of file which you know there. For example "http://192.168.1.1/file_name.html" etc. But if you see the message "the network connection was refused by server 192.168.1.1", something must be still wrong.

Once you make your computer virtual server, have Perl somewhere within it (within the directory selected to be the server). You can download the latest Perl for your O/S; the first place to see is http://www.perl.com/CPAN/. Set the "Path" of the CGI script accordingly. This is must. Other changes are optional. And even if you want to make optional change, see if the CGI works in its default setting at first.