Editing Database Settings


Only Administrators may view eSurvey's database settings. These settings can be viewed through the main navigation bar by clicking System->System Options. The Database Details section displays all of the information needed by eSurvey to connect to its database with the exception of the database password, which is excluded from view for security reasons. Each of the displayed fields is read only and may not be modified through this interface.

In order to make modifications to the database connection details, you must manually modify eSurvey's settings file:
<eSurvey Installation Path>/settings/settings.php
Where <eSurvey Installation Path> is the directory on your web server that eSurvey resides. eSurvey will cease to function properly if any of these settings are incorrect, so create a backup of the settings.php file before modifying it. Using the text editor of your choice to open the settings.php file, you will see PHP code similar to the following:

<?php 
	// $DB_SERVER_NAME 	- The database server to connect to
	// $DB_NAME 	- The name of the eSurvey database
	// $DB_USER_NAME 	- The database user name
	// $DB_PASSWORD 	- The database user's password

	$DB_SERVER_NAME 	= "database_server_name";
	$DB_NAME		= "name_of_database";
	$DB_USER_NAME 	= "database_user_name";
	$DB_PASSWORD 	= "database_password";
?>
The first block of four lines are simply comments explaining what each variable represents. The following four lines of code actually supply eSurvey with the details necessary to connect to the database. The Administrator simply has to modify the values between quotation marks next to each of the four variables to update eSurvey's database connection settings. When finished, save the file, open a browser window, and try to connect to eSurvey. If you can successfully log into eSurvey, then the changes were a success. If the eSurvey application will not display, make sure that the settings you entered in the settings.php file match those of your database configuration.


Related Topics:

<< Parent Topic