Difference between revisions of "Env settings.php"
(9 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
====$server==== | ====$server==== | ||
The type of server being used. Once selected, the directives for that server type need to be verified. | The type of server being used. Once selected, the directives for that server type need to be verified. | ||
− | *'''Permitted options:''' = linux|mac|windows | + | *'''Permitted options:''' = linux|mac|windows |
===General Paths=== | ===General Paths=== | ||
− | ====$ | + | ====$ark_dir==== |
− | + | ||
+ | This is the ARK directory as it will appear in URLs, relative to the domain. This therefore begins with a forward slash, indicating that it is relative to the highest level in this domain. Where ARK is installed in a subdirectory, this information is added here. | ||
+ | |||
+ | Because this refers to a web 'folder' it is followed by a trailing slash. | ||
+ | |||
+ | This path should look identical in all types of server, but is included in this server specific section as a convenient way to keep paths grouped together. | ||
+ | |||
+ | In Linux and Mac systems that use forward slashes within their filesystem paths (Windows uses backslashes) this variable can be used within other paths in this file to reduce repetition, although for clarity, the default setups write out the paths longhand. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | Linux | Windows | Mac | ||
+ | <pre> | ||
+ | $ark_dir = '/ark/'; | ||
+ | Resolves to: | ||
+ | http://www.example.com/ark/ | ||
+ | </pre> | ||
+ | <pre> | ||
+ | $ark_dir = '/my_subfolder/ark/'; | ||
+ | Resolves to: | ||
+ | http://www.example.com/my_subfolder/ark/ | ||
+ | </pre> | ||
− | + | ====$ark_server_path==== | |
+ | The full path to the directory containing ARK within the server's filesystem. This resolves the ARK directory back to the filesystem root. In many cases (not all), this is the $doc_root plus the folder containing the ARK installation, therefore subsititution may be used to reduce repetition. In the case of doubt, it doesn't hurt to write this path out longhand to ensure that it points to the right directory. | ||
Examples: | Examples: | ||
Line 30: | Line 52: | ||
Linux | Linux | ||
<pre> | <pre> | ||
− | $ | + | $pear_path = '/srv/www/htdocs/ark'; |
</pre> | </pre> | ||
Mac | Mac | ||
<pre> | <pre> | ||
− | $ | + | $pear_path = '/Applications/MAMP/htdocs/ark'; |
</pre> | </pre> | ||
Windows | Windows | ||
<pre> | <pre> | ||
− | $ | + | $pear_path = 'C:\ms4w\Apache\htdocs\ark'; |
</pre> | </pre> | ||
====$pear_path==== | ====$pear_path==== | ||
+ | |||
The path to your PEAR installation. This is a fully resolved path to the directory that contains the PEAR files. The system will automatically append this path to PHP's include paths at runtime. | The path to your PEAR installation. This is a fully resolved path to the directory that contains the PEAR files. The system will automatically append this path to PHP's include paths at runtime. | ||
Line 60: | Line 83: | ||
Windows | Windows | ||
<pre> | <pre> | ||
− | $pear_path = | + | $pear_path = 'C:\ms4w\Apache\htdocs\ark\lib\php\pear'; |
+ | </pre> | ||
+ | |||
+ | In order to reduce repetition, the $ark_server_path variable can be substituted for the beginning of this path in cases that the PEAR resides within the docroot (such as the default setups). | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | Linux | ||
+ | <pre> | ||
+ | $pear_path = $ark_server_path.'/lib/php/pear'; | ||
+ | </pre> | ||
+ | |||
+ | ===File Paths=== | ||
+ | |||
+ | ====$registered_files_dir==== | ||
+ | The directory where ARK stores files after they are processed. This location is relative to the filesystem and must be readable and writeable by the webserver. | ||
+ | |||
+ | By default, ARK ships with a "data" folder which contains a "files" folder. In most cases it is convenient to use this structure. Ensure that permissions are set correctly. | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | Linux | ||
+ | <pre> | ||
+ | $registered_files_dir = '/srv/www/htdocs/ark/data/files'; | ||
+ | </pre> | ||
+ | Mac | ||
+ | <pre> | ||
+ | $registered_files_dir = '/Applications/MAMP/htdocs/ark/data/files'; | ||
+ | </pre> | ||
+ | Windows | ||
+ | <pre> | ||
+ | $registered_files_dir = 'C:\ms4w\Apache\htdocs\ark\data\files'; | ||
+ | </pre> | ||
+ | |||
+ | As above, the $ark_server_path can be used as shorthand for part of this path. | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | Linux | ||
+ | <pre> | ||
+ | $registered_files_dir = $ark_server_path.'/data/files'; | ||
+ | </pre> | ||
+ | |||
+ | ====$registered_files_host==== | ||
+ | The folder where files can be found by the webserver. This is relative to the domain (host). This should be the same on all server types. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | Linux | Windows | Mac | ||
+ | <pre> | ||
+ | $ark_dir = '/ark/data/files/'; | ||
+ | Resolves to: | ||
+ | http://www.example.com/ark/data/files/ | ||
+ | </pre> | ||
+ | <pre> | ||
+ | $ark_dir = '/my_subfolder/ark/data/files/'; | ||
+ | Resolves to: | ||
+ | http://www.example.com/my_subfolder/ark/data/files/ | ||
+ | </pre> | ||
+ | |||
+ | ====$default_upload_dir==== | ||
+ | This is the directory which acts as the 'base' for the file uploading interface. This will appear to be the 'top level' for the file browser. This must be relative to the filesystem. | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | Linux | ||
+ | <pre> | ||
+ | $default_upload_dir = '/home/uploads'; | ||
+ | </pre> | ||
+ | Mac | ||
+ | <pre> | ||
+ | $default_upload_dir = '/home/uploads'; | ||
+ | </pre> | ||
+ | Windows | ||
+ | <pre> | ||
+ | $default_upload_dir = 'C:\ms4w\Apache\htdocs\ark\data\uploads'; | ||
</pre> | </pre> | ||
− | + | ====$export_dir==== | |
+ | |||
+ | The directory where CSV and files are saved when created for export. This directory must be relative to the filesystem, must be readable and writeable by the web server. | ||
Examples: | Examples: | ||
Line 69: | Line 169: | ||
Linux | Linux | ||
<pre> | <pre> | ||
− | $ | + | $export_dir = '/srv/www/htdocs/ark/data/tmp'; |
+ | </pre> | ||
+ | Mac | ||
+ | <pre> | ||
+ | $export_dir = '/Applications/MAMP/htdocs/ark/data/tmp'; | ||
+ | </pre> | ||
+ | Windows | ||
+ | <pre> | ||
+ | $export_dir = 'C:\ms4w\Apache\htdocs\ark\data\tmp'; | ||
</pre> | </pre> | ||
− | ====$ark_server_path==== | + | ====$phMagickDir==== |
− | + | ||
+ | This points to the phMagick.php file to be used if required. ARK ships with the phMagick library (ark/lib/php/phMagick/). | ||
+ | |||
+ | You will need to have GD and ImageMagick installed as modules on your PHP for this library to work. If in doubt look at your phpinfo() to see if both modules are loaded. Also run preflight checks. | ||
+ | |||
+ | By default, ARK ships with this line commented out. If you intend to use phMagick (and you have checked that you have GD and ImageMagick), uncomment this directive. | ||
+ | |||
+ | Despite the name, this must point to the file, not the directory. | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | Linux | ||
+ | <pre> | ||
+ | $phMagickDir = $ark_server_path.'/lib/php/phmagick/phmagick.php'; | ||
+ | </pre> | ||
+ | Mac | ||
+ | <pre> | ||
+ | $phMagickDir = $ark_server_path.'/lib/php/phmagick/phmagick.php'; | ||
+ | </pre> | ||
+ | Windows | ||
+ | <pre> | ||
+ | $phMagickDir = $ark_server_path.'\lib\php\phmagick\phmagick.php'; | ||
+ | </pre> | ||
+ | |||
+ | ===Mapping Paths=== | ||
+ | ====$ark_maptemp_dir==== | ||
+ | |||
+ | Path to the directory mapserver uses to store temporary data. Relative to server filesystem. | ||
+ | |||
+ | ====$ark_web_maptemp_dir==== | ||
+ | |||
+ | Path to the same temporary directory relative to the domain. | ||
+ | |||
+ | ====$openlayers_path==== | ||
+ | |||
+ | Path to OpenLayers. This is relative to the web and so can be either specified as a local location relative to this domain, or as a fully resolved path to a remote location. | ||
+ | |||
+ | By default, the local version is selected, in order to use a remote location comment this out and comment in the remote location. | ||
+ | |||
+ | ====$ark_wms_map==== | ||
+ | |||
+ | If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the WMS map file. This is related to the server filesystem. | ||
+ | |||
+ | ====$ark_wfs_map==== | ||
+ | |||
+ | If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the WFS map file. This is related to the server filesystem. | ||
+ | |||
+ | ===Filesystem=== | ||
+ | |||
+ | These directives should not need editing. | ||
+ | |||
+ | ====$fs_path_sep==== | ||
+ | |||
+ | This indicates how paths are separated in path lists. Windows systems us a semicolon and *nix systems use a colon. | ||
+ | |||
+ | ====$fs_slash==== | ||
+ | |||
+ | This indicates how folders within a path are separated. Windows systems use a backslash and *nix systems use a forward slash. | ||
+ | |||
+ | ===Database Settings=== | ||
− | |||
*'''$ark_db''' - Your ARK database | *'''$ark_db''' - Your ARK database | ||
*'''$sql_server''' - The MySQL server | *'''$sql_server''' - The MySQL server | ||
Line 81: | Line 247: | ||
*'''$sql_pwd''' - The MySQL user password | *'''$sql_pwd''' - The MySQL user password | ||
− | === | + | ==DELETED Directives== |
− | |||
− | === | + | ====$doc_root==== |
− | + | As of v1.1 this is no longer required, please remove from your files to prevent confusion. This is now completely superseded by $ark_server_path. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Example Setups== | ==Example Setups== | ||
− | Example setups are provided in the [[env_settings.php]] file | + | Example setups are provided in the [[env_settings.php]] file that ships in the packaged code. |
[[category:Administrator]] | [[category:Administrator]] |
Latest revision as of 13:11, 6 December 2012
Contents
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 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.
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 MUST UPDATE THE SERVER SPECIFIC INFORMATION BEFORE YOUR ARK INSTALLATION WILL FUNCTION
Directives
Server Type
$server
The type of server being used. Once selected, the directives for that server type need to be verified.
- Permitted options: = linux|mac|windows
General Paths
$ark_dir
This is the ARK directory as it will appear in URLs, relative to the domain. This therefore begins with a forward slash, indicating that it is relative to the highest level in this domain. Where ARK is installed in a subdirectory, this information is added here.
Because this refers to a web 'folder' it is followed by a trailing slash.
This path should look identical in all types of server, but is included in this server specific section as a convenient way to keep paths grouped together.
In Linux and Mac systems that use forward slashes within their filesystem paths (Windows uses backslashes) this variable can be used within other paths in this file to reduce repetition, although for clarity, the default setups write out the paths longhand.
Example:
Linux | Windows | Mac
$ark_dir = '/ark/'; Resolves to: http://www.example.com/ark/
$ark_dir = '/my_subfolder/ark/'; Resolves to: http://www.example.com/my_subfolder/ark/
$ark_server_path
The full path to the directory containing ARK within the server's filesystem. This resolves the ARK directory back to the filesystem root. In many cases (not all), this is the $doc_root plus the folder containing the ARK installation, therefore subsititution may be used to reduce repetition. In the case of doubt, it doesn't hurt to write this path out longhand to ensure that it points to the right directory.
Examples:
Linux
$pear_path = '/srv/www/htdocs/ark';
Mac
$pear_path = '/Applications/MAMP/htdocs/ark';
Windows
$pear_path = 'C:\ms4w\Apache\htdocs\ark';
$pear_path
The path to your PEAR installation. This is a fully resolved path to the directory that contains the PEAR files. The system will automatically append this path to PHP's include paths at runtime.
In versions of ARK =< v1.1 these paths began with a colon or semi colon. This is now not required, and will cause the system to fail to load PEAR properly.
Default setup points to the PEAR that ships as a library in ARK.
Examples:
Linux
$pear_path = '/srv/www/htdocs/ark/lib/php/pear';
Mac
$pear_path = '/Applications/MAMP/htdocs/ark/lib/php/pear';
Windows
$pear_path = 'C:\ms4w\Apache\htdocs\ark\lib\php\pear';
In order to reduce repetition, the $ark_server_path variable can be substituted for the beginning of this path in cases that the PEAR resides within the docroot (such as the default setups).
Examples:
Linux
$pear_path = $ark_server_path.'/lib/php/pear';
File Paths
$registered_files_dir
The directory where ARK stores files after they are processed. This location is relative to the filesystem and must be readable and writeable by the webserver.
By default, ARK ships with a "data" folder which contains a "files" folder. In most cases it is convenient to use this structure. Ensure that permissions are set correctly.
Examples:
Linux
$registered_files_dir = '/srv/www/htdocs/ark/data/files';
Mac
$registered_files_dir = '/Applications/MAMP/htdocs/ark/data/files';
Windows
$registered_files_dir = 'C:\ms4w\Apache\htdocs\ark\data\files';
As above, the $ark_server_path can be used as shorthand for part of this path.
Examples:
Linux
$registered_files_dir = $ark_server_path.'/data/files';
$registered_files_host
The folder where files can be found by the webserver. This is relative to the domain (host). This should be the same on all server types.
Example:
Linux | Windows | Mac
$ark_dir = '/ark/data/files/'; Resolves to: http://www.example.com/ark/data/files/
$ark_dir = '/my_subfolder/ark/data/files/'; Resolves to: http://www.example.com/my_subfolder/ark/data/files/
$default_upload_dir
This is the directory which acts as the 'base' for the file uploading interface. This will appear to be the 'top level' for the file browser. This must be relative to the filesystem.
Examples:
Linux
$default_upload_dir = '/home/uploads';
Mac
$default_upload_dir = '/home/uploads';
Windows
$default_upload_dir = 'C:\ms4w\Apache\htdocs\ark\data\uploads';
$export_dir
The directory where CSV and files are saved when created for export. This directory must be relative to the filesystem, must be readable and writeable by the web server.
Examples:
Linux
$export_dir = '/srv/www/htdocs/ark/data/tmp';
Mac
$export_dir = '/Applications/MAMP/htdocs/ark/data/tmp';
Windows
$export_dir = 'C:\ms4w\Apache\htdocs\ark\data\tmp';
$phMagickDir
This points to the phMagick.php file to be used if required. ARK ships with the phMagick library (ark/lib/php/phMagick/).
You will need to have GD and ImageMagick installed as modules on your PHP for this library to work. If in doubt look at your phpinfo() to see if both modules are loaded. Also run preflight checks.
By default, ARK ships with this line commented out. If you intend to use phMagick (and you have checked that you have GD and ImageMagick), uncomment this directive.
Despite the name, this must point to the file, not the directory.
Examples:
Linux
$phMagickDir = $ark_server_path.'/lib/php/phmagick/phmagick.php';
Mac
$phMagickDir = $ark_server_path.'/lib/php/phmagick/phmagick.php';
Windows
$phMagickDir = $ark_server_path.'\lib\php\phmagick\phmagick.php';
Mapping Paths
$ark_maptemp_dir
Path to the directory mapserver uses to store temporary data. Relative to server filesystem.
$ark_web_maptemp_dir
Path to the same temporary directory relative to the domain.
$openlayers_path
Path to OpenLayers. This is relative to the web and so can be either specified as a local location relative to this domain, or as a fully resolved path to a remote location.
By default, the local version is selected, in order to use a remote location comment this out and comment in the remote location.
$ark_wms_map
If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the WMS map file. This is related to the server filesystem.
$ark_wfs_map
If you are using Mapserver via the ark_wxs_server.php, you will need to specify the location of the WFS map file. This is related to the server filesystem.
Filesystem
These directives should not need editing.
$fs_path_sep
This indicates how paths are separated in path lists. Windows systems us a semicolon and *nix systems use a colon.
$fs_slash
This indicates how folders within a path are separated. Windows systems use a backslash and *nix systems use a forward slash.
Database Settings
- $ark_db - Your ARK database
- $sql_server - The MySQL server
- $sql_user - The MySQL user who will make db calls
- $sql_pwd - The MySQL user password
DELETED Directives
$doc_root
As of v1.1 this is no longer required, please remove from your files to prevent confusion. This is now completely superseded by $ark_server_path.
Example Setups
Example setups are provided in the env_settings.php file that ships in the packaged code.