There is no formal installation procedure for aMapApp3. Simply download the zip file, unpack it, and put aMapApp3 into your web server's space. Where in the space is lives in unimportant, but we recommend at the top level where it can be easily shared by a variety of applications. In all of our examples, we're going to assume that this is where the code is loaded.
There are two ways to make aMapApp3 available to an application. You can either run the provided setup script, or you can use a callable function. The later is useful if your application has it's own setup script since the aMapApp3 setup can be folded into the larger setup. Be warned that the setup function has not been extensively tested. In either case the setup creates a configuration file that the application can use and copies certain files into the applications folder on the server. You will need to have the following information available:
|The name of the application5||Name of the web applicaton that's going to use aMapApp3.|
|Path to the application||This is the path to the location of the application. The directory must be writable to the process that runs the setup script, usually either a special server user or the user running setup.|
|Path to the configuration file||This file will be build automatically during the set up process. The path should include the file name. For security the path should not be located within the web servers data tree but it must be located somewhere that the server can write to.|
|Administrator Username||This is an account created within aLogin2 (or other authentication system) that is allowed to administer this instance of aMapApp3 and the authentication and blogging systems. If you are not using aLogin2 and aBlog2, these may not be necessary. Do NOT use a username/password you are using on another system.|
|Administrator Password||This is the pasword to use with account created within aLogin to administer the aLogin and aBlog systems. Do NOT use a username/password you are using on another system. Even if you don't use aLogin for authenticating your application, you'll still need to define this|
|Path to the data library 2||This is the path to a file that contains functions for accessing the database. See the page on using the database for details. Two possible libraries are supplied with aMapApp3, mysql_datalib.php and sqlite_datalib.php. Both are located in the top directory of aMapApp3. (./mysql_datallib.php or ./sqlite_datalib.php) If you use sqlite_datalib.php, it will create a file, mapApp.sqlite at the top level of your application's directory.|
|Path to the utility library 2||This is the path to a file containing some utility functions. You should use the one supplied, pdclib.php. It's also located at the top level of aMapApp3 (./pdcllib.php).|
|URL to the Extjs library||This must be an absolute URL such as /extjs-3.0.3. Do NOT include the server, i.e., /extjs-3.0.3 not /www.amherst.edu/extjs-3.0.3.|
|URL to the Xajax llibrary||This must be an absolute URL such as /xajax_0.5. Do NOT include the server, i.e., /xajax_0.5 not /www.amherst.edu/xajax_0.5.|
|Path to the image directory3||The path to where files that are uploaded will be stored. It must be writable by the web server. The program will create this directory if necessary. It will create subdirectories for every user who uploads a file. Normally this would go inside the applications directory. If security is an issue, this directory can be stored outside of the servers data tree which would make it unavailable to web crawlers that index pages for search engines.|
|Path to the file directory3||This is the location where files associated with the location definition are stored. It must be the within the web server data tree. It must be writable by the web server.|
|Path to Convert command||This is the path to the Convert command installed with ImageMagick.|
|Path to LD Library||This is the path to any library that needs to be loaded in order for the Convert command to work. (See Setup Example).|
|Database Server1||The name of the database server you'll use.|
|Database User1||The name of the database user account which has write access to the database.|
|Database Password1||The password for the database user account.|
|Database Name1||The name of the database that you're going to use of the database. The user you entered must have write access to this database.|
|Table Prefix||Some text that will be appended to database tables. By changing the prefix you can have multiple copies of aMapApp3 use the same database. Limited to 10 characters.|
|Default User Authority Level||This is the authority level that will be given automatically to new accounts by aLogin2. If not using aLogin2 or not allowing users to request new accounts, it wouldn't have any meaning. See the section of Authority Level.|
|Path to aLogin2||Path to where the aLogin2 scripts are on the server. Leave blank if not using aLogin2|
|Path to aBlog2||Path to where the aBlog2 scripts are on the server. Leave blank if not using aBlog2|
|Recaptcha Private Key ****||Private key for using Recaptcha. See the page on authentication for details or the aLogin2 documentation pages.|
|Recaptcha Public Key4||Public key for using Recaptcha. See the page on authentication for details or the aLogin2 documentaton pages.|
1 Depending on how you are handling the database, these fields may or may not be needed.
2 These files are distributed with MapApp, aLogin and aBlog. You can use any copy you want.
3 For historical reasons, if a file is uploaded when a Location is initially created it is handled differently than files that are added afterwards. In this version of the aMapApp, files uploaded at creation time have to be loaded into a directory that is within the data tree of the webserver. Files uploaded later can be located anywhere on the system that a script run by the web server can read. Locating these files outside of the web server data tree prevents web crawlers from finding the files which can be important if you are working with copyrighted material.
4 If blank, Recaptcha will not be used.
5 Single and double quotes in text strings need to be double escaped. For instance, an application name of Paul's site would need to entered as Paul\\\'s site. These strings are processed twice. The first pass would result in Paul\'s Site and the final path would give Paul's Site.
Paths can be given either in absolute terms or relative to the MapApp main directory. Paths are not URLs. For instance, if your web servers data tree starts at /var/www/html and your application lives in the directory myApp at the top level of of the server, and the MapApp library lives in the directory MapApp also at the top level, the path to the application could be give as either /var/www/html/myApp or ../myApp. The URL /myApp wouldn't work for a path.
NOTE: Running setup for MapApp with automatically setup aBlog2 and aLogin2 to run with the web application. You shouldn't run their setup scripts.