| Installation : STEP 1 : Uncompressing the package. |
The first step is to uncompress the software package. you can use Winzip or something similar. Once unzipped you should have a directory structure similar to the directory tree shown in Step 3.
| Installation : STEP 2 : Setup Configuration |
With the software package uncompressed it is now time for the hardest step of the installation process. Here you will need to set up the configuration of HWimage. In particular the HWimage.cgi file. You will need to edit the first 3 lines in CGI script file, then you will need to add the alt templates used by HWimage.
You will need to gather two pieces of information and add this to the first couple lines of the following cgi scripts. NOTE: Since you should already have HAMweather installed and the hwimage.cgi will be in the same directory, then you can actually just copy the top three lines from your hamweather.cgi.
- You will need the path to perl on your on your system. This is usually something like: /usr/bin/perl or /usr/local/bin/perl. You will add this as the first line in the above cgi files. it will look as follows on:
#!/usr/bin/perl
- NOTE: HWimage will do its best to figure out this next piece of informaiton on is own so you now only need to set it if HWimage gives you 500 server errors.
The full path name to the directory where the HAMweather cgi scripts will be. This is not the URL and does not include "http://." For Example: If the full path to the HAMweather script on your system will be: /usr/www/users/hamnet/cgi-bin/hamweather/hamweather.cgi then you will need to know the /usr/www/users/hamnet/cgi-bin/hamweather portion. (On Microsoft NT and W95/98 platforms you will also need to include the drive letter.)
You will use this information to set the $hw_cgi_dir_path variable near the top of the each of the cgi files (The second or third line from the top). The line will look similar to :
$hw_cgi_dir_path = "/usr/www/users/hamnet/cgi-bin/hamweather";
NOTE: If you have the GD.pm module installed locally and have added the 'use lib' command to your hamweather.cgi then you will need to add this to the hwimage.cgi as well.
HWimage also allows you to set a couple lines of text that will be displayed on the basic mode houlry and zone forecast graphics. You could have it display your URL or something of that nature. There are two seperate lines that can be set one for the hourly/current conditions graphic and one for the zone forecast.
To set the 'ad text' for the hourly/current conditions graphic look at line 4 in the hwimage.cgi you will see the following:
$ad_cc_text = 'Set Ad Text Here';
change the text portion to be what ever you want, but you should limit this text to less than 20 characters. For instance to change it to : 'www.hamweather.com' simply change the line to look like:
$ad_cc_text = 'www.hamweather.com';
If you do not want any additional 'ad_text' to be displayed, simly set the value to a null string, as follows:
$ad_cc_text = '';
To set the 'ad text' for the zone forecast graphic look at line 5 in the hwimage.cgi you will see the following:
$ad_zone_text = 'Set Ad Text Here';
change the text portion to be what ever you want, but you should limit this text to less than 40 characters. For instance to change it to : 'Powered by HAMweather www.hamweather.com' simply change the line to look like:
$ad_zone_text = 'Powered by HAMweather www.hamweather.com';
If you do not want any additional 'ad_text' to be displayed, simly set the value to a null string, as follows:
$ad_zone_text = '';
You can also set the cache mode of HWimage. Windows NT users should pay attention here to stop a potential bug from showing up. with the cache mode there are 3 modes:
- 0 = use no cache create image upon every request (not recommended except during testing)
- 1 = cache images, print image upon first request the redirect to cache (recommended for Unix)
- 2 = cache images always redirecting to cache.. (This mode mainly for Windows based servers(Recommended for Windows)
When using HWimage in modes 0 or 1 if you notice that the first time the image is created that it does not display properly, then try setting the cache mode to "2". WIndows NT servers work best with cache mode set to 2.
To set the cache mode, look around line 9 of the hwimage.cgi for the line:
$hwimage_cache_mode = 1;
Just set this to the value needed: 0, 1 or 2.
| Installation : STEP 3 : Upload Files to the Server |
In step three you will upload all the HWimage files to your web server. To do this you will need an FTP program, You can use WsFTP or CuteFTP or somethign similar. You will need to upload the entire contents (even subdirectories) of the "cgi-bin/hamweather" directory to the web server in the path that you specified (in step 2) to hold all the cgi scripts. (we used /usr/www/users/hamnet/cgi-bin/hamweather as the example in step 2.) When uploading you should upload all files in ASCII mode except for the graphic images, which are denoted with the '.gif' filename extension, which should be uploaded in binary format.
While you are uploading you will also need to set the correct permissions for the various files and directories. In the directory structure below you will notice a bunch of letter after each directory or filename. These indicate the permission setting for that file. Use this chart to convert them letter pattern to the appropriate chmod value. NOTE: Most newer FTP programs allow you to set permissions of the files. Refer to your individual programs documentation for instructions on how to do this. The need to set file permissions does not usually exist for Windows NT, 95/98 web servers.
|
The directory structure for the cgi files and subdirectories should stay the same and look similar to this:
NOTE: The HWimage files in the cgi-bin portions should be in the same directory structure as your HAMweather pro files. Thus the hwimage.cgi should be in the same directory as you hamweather.cgi, the hwi_basiclib.pl and hwi_advlib.pl should be in the hamlib directory. You will need to create the hwimage subdirectory in the main hamweather cgi-bin path.
The directory structure for the cgi files and subdirectories should stay the same and look similar to this:(and yes, the few gif images listed in this sections do go in this cgi-bin directory structure) HAMweather cgi-bin Directory (i.e /yourpath/cgi-bin/hamweather) | |__hamlib (dir) (permission set when installing HAMweather Pro) | |__hwi_basiclib.pl (rwxr-xr-x) (chmod 755) | |__hwi_advlib.pl (rwxr-xr-x) (chmod 755) | |__hwitemplates (dir) (your servers default is fine) | |__hwv (dir) (rwxrwxrwx) (chmod 777) | | |__place_holder.txt (rw-rw-r--) (chmod 664) | | | |__hourly.txt (rw-rw-r--) (chmod 664) | |__zone.txt (rw-rw-r--) (chmod 664) | |__ws.txt (rw-rw-r--) (chmod 664) | |__ws.gif (rw-rw-r--) (chmod 664) | |__ws_circle.gif (rw-rw-r--) (chmod 664) | | | |__hwidot.gif (rw-rw-r--) (chmod 664) | |__na.gif (rw-rw-r--) (chmod 664) | |__templates (dir) (your servers default is fine) | |__hwi_zone.gif | |__hwi_zandh.gif | |__hwi_current.gif | |__hwimage.cgi (rwxrwxr-x) (chmod 755) |
Now that that is done
you now need to create the hwimage cache directory on your server. In the images
directory (html side) where all the HAMweather Pro image subdirectories are, you should
see several subdirectories called fcicons, fcmapicons, radar and us. You will need to
create a new subdirectory called hwicache and set its permissions to
(rwxrwxrwx) (chmod 777).
| Installation : STEP 4 : Set Up Give Away Templates |
NOTE: This step is only for users who
want to allow other web sites to easily add your HWimage images to their web site.
HWimage has a method to allow you to allow others to easily add the HWimage images to
their web sites. If you would like to allow this Visit the Give
Away Setup page.
| Installation : STEP 5 : Give it a Try |
Now the installation is done it is the time for the big test! From your web browser access the hwimage.cgi to try it. add the parameters for the image that you would like. For instance try the URL below, but change the URL and path to the hwimage.cgi to match your server:
http://www.yourdomain.com/path/to/hwimage.cgi?forecast=zone&state=va&place=roanoke
This URL uses Basic mode and should display the gif image of the zone forecast for Roanoke, VA in your browser.
If everything is working you should check out the Usage Pages to perform a quick customization.
If you are experiencing problems Review the Install Trouble Shooting Page.
HWimage Debug Mode
HWimage contains a debug mode that will give you information about your server, parameters passed to HWimage and other pertinent HWimage information. To use this mode simply browse to the hwimage.cgi file and pass the debug=1 parameter. The URL would look similar to the following URLs:
http://www.yourdomain.com/cgi-bin/hamweather/hwimage.cgi?debug=1
http://www.yourdomain.com/cgi-bin/hamweather/hwimage.cgi?forecast=zandh&place=blacksburg&state=va&debug=1
When you access the debug mode of HWimage you will see the perl environmental variables, the passed parameters, versions of HWimage and all loaded hamweather library files and other pertinent information. If for some reason you do not see this information then the Debug ability may have been turned off. You can turn debug mode on via the HAMweather web based administration. Simply goto the admin, click the "System Settings" link and set the "Debug mode" property and click save. Alternatively you can edit the hwconfig.txt file. In this file there is a variable named $allow_debug. This variable should be set to 0 to turn on debug ability or 1 to turn off. Changing that line the hwconfig.txt file to the following would turn debug ability on:
$allow_debug = 0;
You can also force the debug mode to stay on with out the need for the debug parameter in the url. this can be useful when debugging forms. To do this set the 'allow_debug' property to '2'. Changing line in the hwconfig.txt file to the value of two as follows would put debug into an always on mode:
$allow_debug = 2;
This debug information maybe useful in solving your HWimage problems. When you are done debugging if you want to turn the debug ability off simply change the $allow_debug value to '1' in the hwconfig.txt file.