|
|
Line 5: |
Line 5: |
| The [[env_settings.php]] file is configured in a standard ARK to be included from within the standard [[settings.php]] file and should not need to be included by name into any page. | | The [[env_settings.php]] file is configured in a standard ARK to be included from within the standard [[settings.php]] file and should not need to be included by name into any page. |
| | | |
− | The directives in this file relate mostly to paths, some attention needs to be paid to ensuring that these paths exist and are readable by your webserver. Some paths also need to be writeable. | + | The directives in this file relate mostly to paths, some attention needs to be paid to ensuring that these paths exist and are readable by your webserver. Some paths also need to be writeable. |
| | | |
− | ==Server Specific Information==
| + | As a rule, you should first switch to the correct type of server environment and then verify the paths for that specific environment. If you are using a Windows server, you ONLY edit the settings for windows. |
− | You will need to edit the following depending on your specific server information. Edit the information under the type of server you are using.
| + | |
| + | '''YOU MUST UPDATE THE SERVER SPECIFIC INFORMATION BEFORE YOUR ARK INSTALLATION WILL FUNCTION''' |
| + | |
| + | ==Directives== |
| | | |
− | '''YOU MUST UPDATE THE SERVER SPECIFIC INFORMATION BEFORE YOUR ARK INSTALLATION WILL FUNCTION. AS A FIRST STEP UPDATE:'''
| |
| *'''$server''' - The server setup being used. This needs to be set the relevant configuration listed below. | | *'''$server''' - The server setup being used. This needs to be set the relevant configuration listed below. |
− |
| |
| *'''$doc_root''' - The document root of the your virtual host | | *'''$doc_root''' - The document root of the your virtual host |
| *'''$pear_path''' - The path to your PEAR installation | | *'''$pear_path''' - The path to your PEAR installation |
Line 32: |
Line 33: |
| *'''$ark_wfs_map''' - If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the relevant map files (WMS and WFS) | | *'''$ark_wfs_map''' - If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the relevant map files (WMS and WFS) |
| | | |
− | ===Windows===
| + | ==Example Setups== |
− | | |
− | A ms4w (mapserver for windows) is appropriate for projects holding the ARK database on a Windows system (eg. a laptop, a Windows shuttle). The env_settings.php for an ms4w installation of ARK should look like this:
| |
− | | |
− | <pre>
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = 'C:\ms4w\Apache\htdocs';
| |
− | // The path to the PEAR installation (windows has ; first)
| |
− | $pear_path = ";C:\ms4w\Apache\htdocs\ark\pear";
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = 'C:\ms4w\Apache\htdocs\ark';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark/';
| |
− |
| |
− | // DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sqlusr';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'sqlpassword';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = 'C:/ms4w/Apache/htdocs/ark/data/uploads';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
− | | |
− | // MAPPING DIRECTORIES
| |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = 'C:/ms4w/Apache/htdocs'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = 'C:/ms4w/Apache/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = 'C:/ms4w/Apache/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | </pre>
| |
− | | |
− | ===Mac===
| |
− | | |
− | A Mac setup will differ from the above. For projects holding the ARK database on a Mac system, the env_settings.php should look like this:
| |
− |
| |
− | <pre>
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = '/Applications/MAMP/htdocs';
| |
− | // The path to the PEAR installation (unix has : first)
| |
− | $pear_path = ':/Applications/MAMP/htdocs/ark/pear';
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = '/Applications/MAMP/htdocs/ark';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark/';
| |
− |
| |
− | // DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sqluser';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'sqlpassword';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = '/Applications/MAMP/htdocs/ark/data/uploads/';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
− | | |
− | // MAPPING DIRECTORIES
| |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = '/Applications/MAMP/htdocs/'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = '/Applications/MAMP/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = '/Applications/MAMP/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | </pre>
| |
− | | |
− | ===Linux===
| |
− | When using a linux system, users will need to use the following env_settings.php configuration:
| |
− | | |
− | <pre>
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = '/srv/www/htdocs/ark/';
| |
− | // The path to the PEAR installation (unix has : first)
| |
− | $pear_path = ':/srv/www/htdocs/ark/pear';
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = '/srv/www/htdocs/ark';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark/';
| |
− |
| |
− | //DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sqluser';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'sqlpassword';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = '/srv/www/htdocs/ark/data/uploads';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
− | | |
− | // MAPPING DIRECTORIES
| |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = '/srv/www/htdocs/'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = '/srv/www/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = '/srv/www/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | </pre>
| |
− | | |
− | ==Example Configuration== | |
− | All together, the env_settings.php file will look different depending on your server setup. A full example of each is shown below.
| |
− | <pre>
| |
− | // -- SERVER SPECIFIC STUFF -- //
| |
− | // Setup the server being used. At the moment this is set to ms4w (windows), mac and linux
| |
− | // it is possible to add more different servers if need be just copy the information from the relevant case.
| |
− | $server = "ms4w";
| |
− | | |
− | switch($server){
| |
− | case "ms4w":
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = 'C:\ms4w\Apache\htdocs';
| |
− | // The path to the PEAR installation (windows has ; first)
| |
− | $pear_path = ";C:\ms4w\Apache\htdocs\ark_v1\pear";
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = 'C:\ms4w\Apache\htdocs\ark_v1';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark_v1/';
| |
− |
| |
− | // DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark_v1';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sql_php_user';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'AtR410AD';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = 'C:/ms4w/Apache/htdocs/ark_v1/data/uploads';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
− | | |
− | // MAPPING DIRECTORIES
| |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = 'C:/ms4w/Apache/htdocs'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = 'C:/ms4w/Apache/htdocs/ark_v1/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = 'C:/ms4w/Apache/htdocs/ark_v1/mapserver/mapfiles/ark.map';
| |
− | break;
| |
− | | |
− | case "mac":
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = '/Applications/MAMP/htdocs';
| |
− | // The path to the PEAR installation (unix has : first)
| |
− | $pear_path = ':/Applications/MAMP/htdocs/ark/pear';
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = '/Applications/MAMP/htdocs/ark';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark/';
| |
− |
| |
− | // DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sqluser';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'sqlpassword';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = '/Applications/MAMP/htdocs/ark/data/uploads/';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
− | | |
− | // MAPPING DIRECTORIES
| |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = '/Applications/MAMP/htdocs/'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = '/Applications/MAMP/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = '/Applications/MAMP/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | break;
| |
− | | |
− | case "linux":
| |
− | // BASIC DIRECTORIES
| |
− | // The document root of this virtual host (as set up in your apache conf)
| |
− | $doc_root = '/srv/www/htdocs/ark/';
| |
− | // The path to the PEAR installation (unix has : first)
| |
− | $pear_path = ':/srv/www/htdocs/ark/pear';
| |
− | // The server path to the ark directory
| |
− | $ark_server_path = '/srv/www/htdocs/ark';
| |
− | // The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
| |
− | $ark_dir = '/ark/';
| |
− |
| |
− | //DATABASE CONNECTION
| |
− | // The mysql db name of this instance of ark
| |
− | $ark_db = 'ark';
| |
− | // The mysqlserver
| |
− | $sql_server = 'localhost';
| |
− | // The mysql user who will make all the db calls
| |
− | $sql_user = 'sqluser';
| |
− | // The mysql user's password
| |
− | $sql_pwd = 'sqlpassword';
| |
− |
| |
− | // EXPORT DIRECTORY
| |
− | $export_dir = $ark_dir.'data/tmp/';
| |
− | | |
− | // FILE DIRECTORIES
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | $registered_files_dir = $doc_root.$ark_dir .'data/files/';
| |
− | // Where the files are stored after they are registered (/ after last folder)
| |
− | // Browser option: deffault is $ark_dir . 'data/files/
| |
− | // If the registered files directory is outside the main server directory then you need to setup an alias in httdp.conf
| |
− | $registered_files_host = $ark_dir . 'data/files/';
| |
− | // Top directory of the file browser - can only search relative to this directory.
| |
− | $default_upload_dir = '/srv/www/htdocs/ark/data/uploads';
| |
− | // -- IMAGE CONVERSION- ph magick directory-- //
| |
− | $phMagickDir = 'php/tools/phmagick/phmagick.php';
| |
| | | |
− | // MAPPING DIRECTORIES
| + | Example setups are provided in the [[env_settings.php]] file provided in the packaged code. |
− | // Path to temp directory (server)
| |
− | $ark_maptemp_dir = '/srv/www/htdocs/'.$ark_dir.'mapserver/tmp';
| |
− | // Path to temp directory (web)
| |
− | $ark_web_maptemp_dir = 'mapserver/tmp/';
| |
− | // Path to OpenLayers on local server
| |
− | $openlayers_path = 'mapserver/openlayers_2.10/OpenLayers.js';
| |
− | // You can also use OpenLayers directly if you are working online
| |
− | //$openlayers_path = 'http://openlayers.org/api/OpenLayers.js';
| |
− | // if you are using mapserver via the ark_wxs_server.php script then you will need to specify your mapfiles */
| |
− | $ark_wms_map = '/srv/www/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | // Path to WFS mapfile (server)
| |
− | $ark_wfs_map = '/srv/www/htdocs/ark/mapserver/mapfiles/ark.map';
| |
− | break;
| |
− | }
| |
− | </pre>
| |
| | | |
| [[category:Administrator]] | | [[category:Administrator]] |
This file contains settings for the specific server environment. This is to separate the settings relating to the server environment from the settings that relate directly to the instance of ARK itself. In order to make life easier for admins, three standard types of server environments are included in the default file. Currently ARK is provided with default setups for Windows, Mac, or Linux servers.
The directives in this file relate mostly to paths, some attention needs to be paid to ensuring that these paths exist and are readable by your webserver. Some paths also need to be writeable.
As a rule, you should first switch to the correct type of server environment and then verify the paths for that specific environment. If you are using a Windows server, you ONLY edit the settings for windows.