The FmPro Migrator CGI-General folder tab contains fields
for entering overall web site-specific parameters which will be used
to generate Perl CGI scripts for the migrated database.
menu: Open... - File Menu item
The Open menu loads migration specific information from the filename.txt
file selected by the user. This menu item also loads the filename.cgi
file (if it exists) which contains previously saved CGI-specific information.
menu: Save As... - File Menu item
The Save As menu saves migration specific information into the filename.txt
file (where "filename" is the filename entered by the user).
CGI specific information (if it has been entered) is also saved by this
menu selection as a file named filename.cgi into the same directory.
If no CGI specific information has been entered a filename.cgi file
is not created.
field: File Version (FileMaker tab)
The File Version field is used to add a version number to each generated
script and HTML file. Each major revision of the scripts for a website
may utilize a different version number. This feature enables webmasters
to perform testing of new scripts with differing version numbers while
maintaining existing scripts on the website. Once the testing has been
completed, the top level HTML filenames may be changed in order to switchover
to the new design with minimal impact to web visitors. If problems are
encountered with the new scripts, the site can quickly be switched back
to the previous HTML and scripts by swapping the top-level HTML files
which submit info to the cgi scripts.
button: Refresh Layouts
This button loads the contents of the layouts.txt file from the Output
Directory if migration scripts have already been generated. The action
of the Refresh Layouts button replaces any existing information concerning
Layouts and Fields which may have previously been loaded into memory.
field: Layouts
Once the CGI specific data has been loaded by clicking the Refresh Layouts
button or selecting Open... from the File menu, the fields named Layouts
and Fields will be populated with information about the FileMaker database.
Clicking on any individual layout name will present the user with the
top level Layout screen for that particular layout.
field: Fields
The Fields field will be populated with the fields associated with an
individual layout. Clicking on any individual field will present the
user with the screen of info for that particular field. Clicking on
either a field or layout name will instantly present the user with the
relevant information for the layout or field which has been selected.
button: Generate CGI
If CGI specific information has been entered, Perl CGI scripts are generated
for each layout of the FileMaker database. Even though migration scripts
are generated for every open FileMaker database file, CGI scripts are
only generated for one FileMaker database file at a time - as specified
by the contents of the layouts.txt file. This is necessary because of
the need to manually enter layout and field specific information for
each database layout.
menu: Web Server
The two types of supported web servers are UNIX (which includes Linux
and MacOS X) and Windows. CGI scripts generated for UNIX web servers
are optimized for use with the Apache web server. This means that it
is important for the Path to Perl field to be filled out correctly on
the FileMaker tab for proper execution of the scripts by the web server
software. Also, Perl CGI scripts generated for UNIX servers do not utilize
the ".pl" filename extension. This feature deprives a potential
web attacker of information regarding whether the scripts are created
as Perl, PHP, shell scripts or some type of binary compiled application.
If Windows is selected as the web server OS, the ".pl" extension
is added to each CGI script so that scripts are executed by the Perl
interpreter. A creative Windows webmaster could generate scripts for
a UNIX server, manually append the ".cgi" extension to each
file and then use Windows to associate the ".cgi" extension
with the Perl interpreter. [If an Oracle database is used, this creative
solution would also require manually compiling the DBD::Oracle driver
for use with Oracle 8 if CLOB/BLOB objects were utilized within the
database table.]
menu: Display Results
Query results lists are limited to the number of results displayed per
web page which have been selected in this menu. If additional results
are available, the user is able to click on a Next link to display additional
information.
field: Max Submit Size
(Bytes)
For security purposes is it necessary to limit the amount of info which
is accepted by the script from submit forms. This limitation is implemented
in order to prevent a web attacker from accomplishing a denial of service
or buffer overflow attack on the web server. Exceeding the specified
limit defined in this field causes CGI.pm to zero out the data for all
submitted fields. When this occurs, all data validation subroutines
which require a minimum number of characters to be entered will fail
- even if info has been properly entered into the field. The web developer
needs to plan for the maximum amount of data which will be processed
by the script in order to prevent unexpected behavior for web users.
The default value of 10000 bytes is generally a high enough number for
most text forms, but often won't be high enough for insertion of images
into the database. Each Perl CGI script generated by FmPro Migrator
which processes LONG/BLOB data is also designed to limit the amount
of LONG/BLOB data to the value specified for the Max Submit Size on
the General tab of FmPro Migrator. The Max Submit Size should be configured
to handle the maximum amount of data which will be processed by the
script in one submission. A script which needs to handle 10,000 bytes
of text plus the uploading of five 100,000 byte images in the same submission
should be configured with the Max Submit Size set for 510,000 bytes.
field: Website URL
The website URL entered into this field is used for creating script
submission URLs. The string "http://" may be prefixed to the
URL, or it will be added by FmPro Migrator if it is omitted. For testing
purposes, an IP address to a test web server may be entered into this
field. Once testing has been completed, the correct website URL may
be entered here in order to generate scripts for the production web
server.