Difference between revisions of "Env settings.php"

From ARK
Jump to: navigation, search
(MS4W)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
This small file contains only settings relating to the specific server environment. This is specifically for the ends of multiple sever environments.  There are three settings which you need to think about: the document root of this virtual host, the path to the pear configuration, and the path to the ARK directory.
+
This small file contains only settings relating to the specific server environment. This is specifically for the ends of multiple sever environments.  There are various settings and paths that need to be configured first. Currently ARK is set up to be used on either Mapserver for Windows (ms4w), Mac, or Linux servers. The [[env_settings.php]] must be included in the [[settings.php]], and the server setup defined as below.
 +
 
 +
==Server Setup==
 +
The server setup being used:
 +
<pre>
 +
$server="ms4w";
 +
</pre>
 +
 
 +
===Server Specific Information===
 +
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.  AS A FIRST STEP UPDATE:'''
 +
*'''$ark_dir''' - your ark directory
 +
*'''$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
 +
 
  
 
The env_settings.php file will look different depending on your server setup.  An example of each is shown below.
 
The env_settings.php file will look different depending on your server setup.  An example of each is shown below.
 +
<pre>
 +
switch($server){
 +
 +
case ms4w:
 +
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 +
$ark_dir = '/ark/';
 +
// 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 = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'psw';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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:/';
 +
break;
 +
case mac:
 +
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 +
$ark_dir = '/ark/';
 +
// The mysql db name of this instance of ark
 +
$ark_db = 'ark';
 +
// The mysqlserver
 +
$sql_server = '127.0.0.1';
 +
// The mysql user who will make all the db calls
 +
$sql_user = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'pws';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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';
 +
 +
break;
 +
case linux:
 +
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 +
$ark_dir = '/ark/';
 +
// 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 = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'pwd';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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';
 +
break;
 +
}
 +
</pre>
  
 
====MS4W====
 
====MS4W====
Line 10: Line 102:
  
 
<pre>
 
<pre>
// The document root of this virtual host (as set up in your apache conf)
+
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
$doc_root = 'C:\ms4w\Apache\htdocs';
+
$ark_dir = '/ark/';
// The path to the PEAR installation (windows has ; first)
+
// The mysql db name of this instance of ark
$pear_path = ";C:\ms4w\Apache\php\PEAR";
+
$ark_db = 'ark';
// The server path to the ark directory
+
// The mysqlserver
$ark_server_path = 'C:\ms4w\Apache\htdocs\ark';
+
$sql_server = 'localhost';
 +
// The mysql user who will make all the db calls
 +
$sql_user = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'psw';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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:/';
 
</pre>
 
</pre>
  
Line 23: Line 130:
 
 
 
<pre>
 
<pre>
// The document root of this virtual host (as set up in your apache conf)
+
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
$doc_root = '/Applications/MAMP/htdocs';
+
$ark_dir = '/ark/';
// The path to the PEAR installation (unix has : first)
+
// The mysql db name of this instance of ark
$pear_path = ':/Applications/MAMP/htdocs/pear/';
+
$ark_db = 'ark';
// The server path to the ark directory
+
// The mysqlserver
$ark_server_path = '/Users/user1/Sites/ark/';
+
$sql_server = '127.0.0.1';
 +
// The mysql user who will make all the db calls
 +
$sql_user = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'pws';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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';
 
</pre>
 
</pre>
  
Line 35: Line 157:
  
 
<pre>
 
<pre>
// The document root of this virtual host (as set up in your apache conf)
+
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
$doc_root = '/srv/www/docroot/';
+
$ark_dir = '/ark/';
// The path to the PEAR installation (unix has : first)
+
// The mysql db name of this instance of ark
$pear_path = ':/usr/share/php5/PEAR';
+
$ark_db = 'ark';
// The server path to the ark directory
+
// The mysqlserver
$ark_server_path = '/srv/www/htdocs/ark';
+
$sql_server = 'localhost';
 +
// The mysql user who will make all the db calls
 +
$sql_user = 'usr';
 +
// The mysql user's password
 +
$sql_pwd = 'pwd';
 +
// EXPORT
 +
$export_dir = $ark_dir.'data/tmp/';
 +
// FILE specific
 +
// 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: default 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';
 
</pre>
 
</pre>
  
 
[[category:Administrator]]
 
[[category:Administrator]]

Revision as of 18:58, 23 February 2011

This small file contains only settings relating to the specific server environment. This is specifically for the ends of multiple sever environments. There are various settings and paths that need to be configured first. Currently ARK is set up to be used on either Mapserver for Windows (ms4w), Mac, or Linux servers. The env_settings.php must be included in the settings.php, and the server setup defined as below.

Server Setup

The server setup being used:

$server="ms4w";

Server Specific Information

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. AS A FIRST STEP UPDATE:

  • $ark_dir - your ark directory
  • $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


The env_settings.php file will look different depending on your server setup. An example of each is shown below.

switch($server){
	
	case ms4w:
		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// 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 = 'usr';
		// The mysql user's password
		$sql_pwd = 'psw';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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:/';
	break;
	case mac:
		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// The mysql db name of this instance of ark
		$ark_db = 'ark';
		// The mysqlserver
		$sql_server = '127.0.0.1';
		// The mysql user who will make all the db calls
		$sql_user = 'usr';
		// The mysql user's password
		$sql_pwd = 'pws';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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';

	break;
	case linux:
		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// 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 = 'usr';
		// The mysql user's password
		$sql_pwd = 'pwd';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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';
	break;
}

MS4W

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:

		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// 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 = 'usr';
		// The mysql user's password
		$sql_pwd = 'psw';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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:/';

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:

		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// The mysql db name of this instance of ark
		$ark_db = 'ark';
		// The mysqlserver
		$sql_server = '127.0.0.1';
		// The mysql user who will make all the db calls
		$sql_user = 'usr';
		// The mysql user's password
		$sql_pwd = 'pws';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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';

Linux

When using a linux system, users will need to use the following env_settings.php configuration:

		// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
		$ark_dir = '/ark/';
		// 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 = 'usr';
		// The mysql user's password
		$sql_pwd = 'pwd';
		// EXPORT
 		$export_dir = $ark_dir.'data/tmp/';
		// FILE specific
		// 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: default 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';