Difference between revisions of "Env settings.php"

From ARK
Jump to: navigation, search
(Server Setup)
Line 4: Line 4:
  
 
==Server Setup==
 
==Server Setup==
The server setup being used:
+
The server setup being used (can include"ms4w", "mac", or "linux":
 
<pre>
 
<pre>
 
$server="ms4w";
 
$server="ms4w";
 
</pre>
 
</pre>
  
===Server Specific Information===
+
==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 will need to edit the following depending on your specific server information.  Edit the information under the type of server you are using.   
  
Line 19: Line 19:
 
*'''$sql_pwd''' - The mysql user password
 
*'''$sql_pwd''' - The mysql user password
  
 +
===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 env_settings.php file will look different depending on your server setup.  An example of each is shown below.
 
 
<pre>
 
<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)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 46: Line 45:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = 'C:/';
 
$default_upload_dir = 'C:/';
break;
+
</pre>
case mac:
+
 
 +
===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>
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 69: Line 73:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = '\srv';
 
$default_upload_dir = '\srv';
 +
</pre>
 +
 +
===Linux===
 +
When using a linux system, users will need to use the following env_settings.php configuration:
  
break;
+
<pre>
case linux:
 
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 93: Line 100:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = '\srv';
 
$default_upload_dir = '\srv';
break;
 
}
 
 
</pre>
 
</pre>
  
====MS4W====
+
==Example Configuration==
 
+
The env_settings.php file will look different depending on your server setup.  An example of each is shown below.
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>
 
<pre>
 +
$server="ms4w";
 +
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)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 123: Line 129:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = 'C:/';
 
$default_upload_dir = 'C:/';
</pre>
+
break;
 
+
case mac:
====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>
 
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 151: Line 152:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = '\srv';
 
$default_upload_dir = '\srv';
</pre>
 
  
====Linux====
+
break;
When using a linux system, users will need to use the following env_settings.php configuration:
+
case linux:
 
 
<pre>
 
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
// The folder name of THIS instance of Ark (relative to the document root of the host in which it is hosted)
 
$ark_dir = '/ark/';
 
$ark_dir = '/ark/';
Line 178: Line 176:
 
// Top directory of the file browser - can only search relative to this directory.  
 
// Top directory of the file browser - can only search relative to this directory.  
 
$default_upload_dir = '\srv';
 
$default_upload_dir = '\srv';
 +
break;
 +
}
 
</pre>
 
</pre>
  
 
[[category:Administrator]]
 
[[category:Administrator]]

Revision as of 19:06, 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 (can include"ms4w", "mac", or "linux":

$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

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';

Example Configuration

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

$server="ms4w";
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;
}